Skip to content

Commit

Permalink
Merge pull request #217 from PixiEditor/bug/ZoomShortcutCrash
Browse files Browse the repository at this point in the history
Fixed +/- crash
  • Loading branch information
flabbet committed Aug 1, 2021
2 parents a3eee57 + fce881d commit 64ab53d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ private void ToggleGridLines(object parameter)
private void ZoomViewport(object parameter)
{
double zoom = (int)parameter;
Owner.BitmapManager.ActiveDocument.ZoomViewportTrigger.Execute(this, zoom);
if (Owner.BitmapManager.ActiveDocument is not null)
{
Owner.BitmapManager.ActiveDocument.ZoomViewportTrigger.Execute(this, zoom);
}
}
}
}

0 comments on commit 64ab53d

Please sign in to comment.