]> git.sesse.net Git - mlt/commitdiff
Initialize processed var and skip if NULL.
authorDan Dennedy <dan@dennedy.org>
Thu, 5 Aug 2010 06:04:32 +0000 (23:04 -0700)
committerDan Dennedy <dan@dennedy.org>
Thu, 5 Aug 2010 06:04:32 +0000 (23:04 -0700)
src/modules/gtk2/producer_pixbuf.c

index 25edda749e4e49678b7f8c9d863bb260aa863e38..5af0318e7ae862b22496f15c5bc8c4aafb1429a0 100644 (file)
@@ -306,7 +306,7 @@ static void refresh_image( producer_pixbuf this, mlt_frame frame, int width, int
 
                                if ( exif_orientation > 1 )
                                {
-                                       GdkPixbuf *processed;
+                                       GdkPixbuf *processed = NULL;
                                        GdkPixbufRotation matrix = GDK_PIXBUF_ROTATE_NONE;
 
                                        // Rotate image according to exif data
@@ -338,7 +338,8 @@ static void refresh_image( producer_pixbuf this, mlt_frame frame, int width, int
                                              processed = pixbuf;
                                              break;
                                        }
-                                       pixbuf = gdk_pixbuf_rotate_simple( processed, matrix );
+                                       if ( processed )
+                                               pixbuf = gdk_pixbuf_rotate_simple( processed, matrix );
                                }
                        }
 #endif