Fix crash using NewBrush when Home tab is selected

This commit is contained in:
blackmiaool 2015-05-04 13:25:48 +08:00
parent 9bf11e0b40
commit 00b45c3bd7

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()) {