mirror of https://github.com/aseprite/aseprite.git
Fix crash accessing null extra cel when rendering interactive text (fix #5227)
build / build (Debug, macos-latest, lua, cli) (push) Has been cancelled
Details
build / build (Debug, macos-latest, noscripts, cli) (push) Has been cancelled
Details
build / build (Debug, ubuntu-latest, lua, cli) (push) Has been cancelled
Details
build / build (Debug, ubuntu-latest, noscripts, cli) (push) Has been cancelled
Details
build / build (Debug, windows-latest, lua, cli) (push) Has been cancelled
Details
build / build (Debug, windows-latest, noscripts, cli) (push) Has been cancelled
Details
build / build (RelWithDebInfo, macos-latest, lua, gui) (push) Has been cancelled
Details
build / build (RelWithDebInfo, ubuntu-latest, lua, gui) (push) Has been cancelled
Details
build / build (RelWithDebInfo, windows-latest, lua, gui) (push) Has been cancelled
Details
build / build (Debug, macos-latest, lua, cli) (push) Has been cancelled
Details
build / build (Debug, macos-latest, noscripts, cli) (push) Has been cancelled
Details
build / build (Debug, ubuntu-latest, lua, cli) (push) Has been cancelled
Details
build / build (Debug, ubuntu-latest, noscripts, cli) (push) Has been cancelled
Details
build / build (Debug, windows-latest, lua, cli) (push) Has been cancelled
Details
build / build (Debug, windows-latest, noscripts, cli) (push) Has been cancelled
Details
build / build (RelWithDebInfo, macos-latest, lua, gui) (push) Has been cancelled
Details
build / build (RelWithDebInfo, ubuntu-latest, lua, gui) (push) Has been cancelled
Details
build / build (RelWithDebInfo, windows-latest, lua, gui) (push) Has been cancelled
Details
This commit is contained in:
parent
444ef0f6b4
commit
ab29b84f25
|
@ -85,7 +85,8 @@ public:
|
|||
|
||||
void setExtraCelBounds(const gfx::Rect& bounds)
|
||||
{
|
||||
if (bounds.w != m_extraCel->image()->width() || bounds.h != m_extraCel->image()->height()) {
|
||||
doc::Image* extraImg = m_extraCel->image();
|
||||
if (!extraImg || bounds.w != extraImg->width() || bounds.h != extraImg->height()) {
|
||||
createExtraCel(m_editor->getSite(), bounds);
|
||||
}
|
||||
else {
|
||||
|
@ -228,12 +229,21 @@ private:
|
|||
|
||||
void renderExtraCelBase()
|
||||
{
|
||||
auto extraImg = m_extraCel->image();
|
||||
doc::Image* extraImg = m_extraCel->image();
|
||||
ASSERT(extraImg);
|
||||
if (!extraImg)
|
||||
return;
|
||||
|
||||
const doc::Cel* extraCel = m_extraCel->cel();
|
||||
ASSERT(extraCel);
|
||||
if (!extraCel)
|
||||
return;
|
||||
|
||||
extraImg->clear(extraImg->maskColor());
|
||||
render::Render().renderLayer(extraImg,
|
||||
m_editor->layer(),
|
||||
m_editor->frame(),
|
||||
gfx::Clip(0, 0, m_extraCel->cel()->bounds()),
|
||||
gfx::Clip(0, 0, extraCel->bounds()),
|
||||
doc::BlendMode::SRC);
|
||||
}
|
||||
|
||||
|
@ -271,7 +281,12 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
doc::blend_image(m_extraCel->image(),
|
||||
doc::Image* extraImg = m_extraCel->image();
|
||||
ASSERT(extraImg);
|
||||
if (!extraImg)
|
||||
return;
|
||||
|
||||
doc::blend_image(extraImg,
|
||||
image.get(),
|
||||
gfx::Clip(image->bounds().size()),
|
||||
m_doc->sprite()->palette(m_editor->frame()),
|
||||
|
|
Loading…
Reference in New Issue