added a null check, otherwise it can crash when loading an empty file
This commit is contained in:
parent
e54d5b4451
commit
295fc16eff
@ -2380,6 +2380,7 @@ static void nsvg__imageBounds(NSVGparser* p, float* bounds)
|
|||||||
{
|
{
|
||||||
NSVGshape* shape;
|
NSVGshape* shape;
|
||||||
shape = p->image->shapes;
|
shape = p->image->shapes;
|
||||||
|
if (shape == NULL) return;
|
||||||
bounds[0] = shape->bounds[0];
|
bounds[0] = shape->bounds[0];
|
||||||
bounds[1] = shape->bounds[1];
|
bounds[1] = shape->bounds[1];
|
||||||
bounds[2] = shape->bounds[2];
|
bounds[2] = shape->bounds[2];
|
||||||
|
Loading…
Reference in New Issue
Block a user