diff --git a/toonz/sources/toonz/xsheetcmd.cpp b/toonz/sources/toonz/xsheetcmd.cpp index 32673fc..1f36899 100644 --- a/toonz/sources/toonz/xsheetcmd.cpp +++ b/toonz/sources/toonz/xsheetcmd.cpp @@ -829,7 +829,8 @@ public: TApp *app = TApp::instance(); TKeyframeSelection *selection = dynamic_cast( app->getCurrentSelection()->getSelection()); - int row = app->getCurrentFrame()->getFrame(); + if (!selection) return; + int row = app->getCurrentFrame()->getFrame(); selection->selectNone(); ToonzScene *scene = app->getCurrentScene()->getScene(); @@ -862,7 +863,7 @@ public: TApp *app = TApp::instance(); TKeyframeSelection *selection = dynamic_cast( app->getCurrentSelection()->getSelection()); - + if (!selection) return; int col = app->getCurrentColumn()->getColumnIndex(); TStageObjectId objectId = app->getCurrentObject()->getObjectId(); if (app->getCurrentObject()->getObjectId() == TStageObjectId::CameraId(0)) {