mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 09:04:02 +00:00
Fix crash when the gif decoder cannot create the sprite
This commit is contained in:
parent
32b12d17da
commit
4a1356cf78
@ -204,14 +204,18 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// Add entries to include the transparent color
|
||||
if (m_bgIndex >= m_sprite->palette(0)->size())
|
||||
m_sprite->palette(0)->resize(m_bgIndex+1);
|
||||
if (m_sprite) {
|
||||
// Add entries to include the transparent color
|
||||
if (m_bgIndex >= m_sprite->palette(0)->size())
|
||||
m_sprite->palette(0)->resize(m_bgIndex+1);
|
||||
|
||||
if (m_layer && m_opaque)
|
||||
m_layer->configureAsBackground();
|
||||
if (m_layer && m_opaque)
|
||||
m_layer->configureAsBackground();
|
||||
|
||||
return (m_sprite != nullptr);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user