added a null check, otherwise it can crash when loading an empty file

This commit is contained in:
Miha Lunar 2014-09-25 20:17:23 +02:00
parent e54d5b4451
commit 295fc16eff

View File

@ -2380,6 +2380,7 @@ static void nsvg__imageBounds(NSVGparser* p, float* bounds)
{
NSVGshape* shape;
shape = p->image->shapes;
if (shape == NULL) return;
bounds[0] = shape->bounds[0];
bounds[1] = shape->bounds[1];
bounds[2] = shape->bounds[2];