From c7aa6fbfb070443246aaa1fba954779c43f7cef5 Mon Sep 17 00:00:00 2001 From: shun_iwasawa Date: Jul 05 2016 05:24:07 +0000 Subject: fix brush undo crash --- diff --git a/toonz/sources/tnztools/toolutils.cpp b/toonz/sources/tnztools/toolutils.cpp index 2c73a37..666da37 100644 --- a/toonz/sources/tnztools/toolutils.cpp +++ b/toonz/sources/tnztools/toolutils.cpp @@ -1067,7 +1067,8 @@ void ToolUtils::UndoPencil::undo() const { if (!stroke) return; image->deleteStroke(stroke); TSelection *selection = app->getCurrentSelection()->getSelection(); - if (StrokeSelection *strokeSelection = (StrokeSelection *)selection) + StrokeSelection *strokeSelection = dynamic_cast(selection); + if (strokeSelection) strokeSelection->selectNone(); UINT size = m_fillInformation->size();