mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +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 dispose(RenderMethod& renderer)
|
||||||
{
|
{
|
||||||
|
bool ret = true;
|
||||||
if (paint) {
|
if (paint) {
|
||||||
paint->pImpl->dispose(renderer);
|
ret = paint->pImpl->dispose(renderer);
|
||||||
delete(paint);
|
delete(paint);
|
||||||
return true;
|
paint = nullptr;
|
||||||
}
|
}
|
||||||
else if (pixels) {
|
else if (pixels) {
|
||||||
auto ret = renderer.dispose(rdata);
|
ret = renderer.dispose(rdata);
|
||||||
rdata = nullptr;
|
rdata = nullptr;
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
return true;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void resize()
|
void resize()
|
||||||
|
|
Loading…
Add table
Reference in a new issue