mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
common picture: fix minor logic.
missing nulling pointer, also return value properly.
This commit is contained in:
parent
e9939dec82
commit
6db796acf3
1 changed files with 5 additions and 5 deletions
|
@ -46,17 +46,17 @@ struct Picture::Impl
|
|||
|
||||
bool dispose(RenderMethod& renderer)
|
||||
{
|
||||
bool ret = true;
|
||||
if (paint) {
|
||||
paint->pImpl->dispose(renderer);
|
||||
ret = paint->pImpl->dispose(renderer);
|
||||
delete(paint);
|
||||
return true;
|
||||
paint = nullptr;
|
||||
}
|
||||
else if (pixels) {
|
||||
auto ret = renderer.dispose(rdata);
|
||||
ret = renderer.dispose(rdata);
|
||||
rdata = nullptr;
|
||||
return ret;
|
||||
}
|
||||
return true;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void resize()
|
||||
|
|
Loading…
Add table
Reference in a new issue