mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
tvg_saver TvgSaver: Initialize local value
If paint has no path information or stroke information, it is not referenced inside bounds. This will access the uninitialized variable at line 759, 760.
This commit is contained in:
parent
2aa551e222
commit
6400493859
1 changed files with 1 additions and 0 deletions
|
@ -752,6 +752,7 @@ bool TvgSaver::save(Paint* paint, const string& path, bool compress)
|
|||
if (!this->path) return false;
|
||||
|
||||
float x, y;
|
||||
x = y = 0;
|
||||
paint->bounds(&x, &y, &vsize[0], &vsize[1], false);
|
||||
|
||||
//cut off the negative space
|
||||
|
|
Loading…
Add table
Reference in a new issue