Merge pull request #579 from shun-iwasawa/fix_brush_undo_crash

Fix crash on undo brush tool
This commit is contained in:
turtletooth 2016-07-05 00:34:28 -06:00 committed by GitHub
commit e7501e0aea

View file

@ -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<StrokeSelection *>(selection);
if (strokeSelection)
strokeSelection->selectNone();
UINT size = m_fillInformation->size();