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