mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-16 13:14:44 +00:00
Fix crash deleting a group layer at the top level
The crash could be achieved by having just one group layer at the top level (with some children) and trying to delete it using Layer > Delete Layer menu option (without using the timeline range). Report: https://igarastudio.zendesk.com/agent/tickets/1719
This commit is contained in:
parent
32106512dc
commit
3035a5713d
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2020 Igara Studio S.A.
|
||||
// Copyright (C) 2020-2021 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -78,7 +78,7 @@ void RemoveLayerCommand::onExecute(Context* context)
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (sprite->allLayersCount() == 1) {
|
||||
if (sprite->root()->layersCount() == 1) {
|
||||
ui::Alert::show(Strings::alerts_cannot_delete_all_layers());
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user