mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-06 06:50:07 +00:00
Fix crash when previewing a sprite sheet export when selecting an empty layer group located at the bottom of the layer stack in the "Layers" combo box.
This commit is contained in:
parent
531b2ded75
commit
dd9f1ce988
@ -311,7 +311,7 @@ LayerImage* Sprite::backgroundLayer() const
|
|||||||
Layer* Sprite::firstLayer() const
|
Layer* Sprite::firstLayer() const
|
||||||
{
|
{
|
||||||
Layer* layer = root()->firstLayer();
|
Layer* layer = root()->firstLayer();
|
||||||
while (layer->isGroup())
|
while (layer && layer->isGroup())
|
||||||
layer = static_cast<LayerGroup*>(layer)->firstLayer();
|
layer = static_cast<LayerGroup*>(layer)->firstLayer();
|
||||||
return layer;
|
return layer;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user