From f168fbc5c90057e1512491b57269cac3d072711a Mon Sep 17 00:00:00 2001 From: manongjohn Date: Aug 20 2017 14:24:51 +0000 Subject: Fix Select keyframes hotkey crash --- 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)) {