mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 10:20:48 +00:00
Avoid assert fail calling SelectedLayers::insert(nullptr)
This commit is contained in:
parent
1dd58ae48f
commit
46ea414287
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2001-2016 David Capello
|
||||
// Copyright (C) 2001-2017 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
// the End-User License Agreement for Aseprite.
|
||||
@ -47,6 +47,10 @@ bool LayerVisibilityCommand::onEnabled(Context* context)
|
||||
bool LayerVisibilityCommand::onChecked(Context* context)
|
||||
{
|
||||
const ContextReader reader(context);
|
||||
if (!reader.document() ||
|
||||
!reader.layer())
|
||||
return false;
|
||||
|
||||
SelectedLayers selLayers;
|
||||
auto range = App::instance()->timeline()->range();
|
||||
if (range.enabled()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user