mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-28 17:15:57 +00:00
tvg_saver: do not pass through if the view size is invalid.
This commit is contained in:
parent
b3aed50a2e
commit
dc7bb0deed
1 changed files with 3 additions and 0 deletions
|
@ -72,6 +72,9 @@ bool TvgSaver::writeViewSize()
|
|||
{
|
||||
float var[2];
|
||||
paint->bounds(nullptr, nullptr, &var[0], &var[1]);
|
||||
|
||||
if (var[0] <= 0.0f || var[1] <= 0.0f) return false;
|
||||
|
||||
writeData(var, SIZE(var));
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue