mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
gif/saver: fix a invalid memory access
This commit is contained in:
parent
10e566edc1
commit
6d59bc6c66
1 changed files with 2 additions and 2 deletions
|
@ -41,6 +41,8 @@ void GifSaver::run(unsigned tid)
|
|||
buffer = (uint32_t*)realloc(buffer, sizeof(uint32_t) * w * h);
|
||||
canvas->target(buffer, w, w, h, tvg::SwCanvas::ABGR8888S);
|
||||
canvas->push(cast(bg));
|
||||
bg = nullptr;
|
||||
|
||||
canvas->push(cast(animation->picture()));
|
||||
|
||||
//use the default fps
|
||||
|
@ -75,8 +77,6 @@ void GifSaver::run(unsigned tid)
|
|||
}
|
||||
|
||||
if (!gifEnd(&writer)) TVGERR("GIF_SAVER", "Failed gif encoding");
|
||||
|
||||
this->bg = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue