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:
JunsuChoi 2021-11-08 15:05:16 +09:00 committed by Hermet Park
parent 2aa551e222
commit 6400493859

View file

@ -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