Merge pull request #656 from blackmiaool/fix_new_brush

Fix crash using NewBrush when Home tab is selected
This commit is contained in:
David Capello 2015-05-04 11:57:26 -03:00
commit 9528cae9db

View File

@ -64,6 +64,10 @@ bool NewBrushCommand::onEnabled(Context* context)
void NewBrushCommand::onExecute(Context* context)
{
ASSERT(current_editor);
if (!current_editor)
return;
// If there is no visible mask, the brush must be selected from the
// current editor.
if (!context->activeDocument()->isMaskVisible()) {