Skip to content

Commit

Permalink
Fix crash when previewing a sprite sheet export when selecting an emp…
Browse files Browse the repository at this point in the history
…ty layer group located at the bottom of the layer stack in the "Layers" combo box.
  • Loading branch information
Gasparoken committed May 17, 2024
1 parent 3ea0437 commit 9b2ea22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/sprite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ LayerImage* Sprite::backgroundLayer() const
Layer* Sprite::firstLayer() const
{
Layer* layer = root()->firstLayer();
while (layer->isGroup())
while (layer && layer->isGroup())
layer = static_cast<LayerGroup*>(layer)->firstLayer();
return layer;
}
Expand Down

0 comments on commit 9b2ea22

Please sign in to comment.