mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 20:14:37 +00:00
gl_engine: fix memory leak when rendering image
This commit is contained in:
parent
3dcc22309d
commit
4a1a586be9
1 changed files with 4 additions and 1 deletions
|
@ -950,7 +950,10 @@ bool GlRenderer::renderImage(void* data)
|
||||||
auto task = new GlRenderTask(mPrograms[RT_Image].get());
|
auto task = new GlRenderTask(mPrograms[RT_Image].get());
|
||||||
task->setDrawDepth(drawDepth);
|
task->setDrawDepth(drawDepth);
|
||||||
|
|
||||||
if (!sdata->geometry->draw(task, mGpuBuffer.get(), RenderUpdateFlag::Image)) return true;
|
if (!sdata->geometry->draw(task, mGpuBuffer.get(), RenderUpdateFlag::Image)) {
|
||||||
|
delete task;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// matrix buffer
|
// matrix buffer
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue