emile: check that we actually do have option before using them.
authorCedric BAIL <cedric@osg.samsung.com>
Sat, 25 Apr 2015 16:52:22 +0000 (18:52 +0200)
committerCedric BAIL <cedric@osg.samsung.com>
Sat, 25 Apr 2015 16:52:22 +0000 (18:52 +0200)
CID 1288929

src/lib/emile/emile_image.c

index a5cfb04..180f447 100644 (file)
@@ -1698,7 +1698,7 @@ _emile_jpeg_data(Emile_Image *image,
         ie_h = prop->h;
      }
 
-   if ((opts->region.w > 0) && (opts->region.h > 0))
+   if (opt && ((opts->region.w > 0) && (opts->region.h > 0)))
      {
         region = 1;