[Xfce4-commits] <ristretto:ristretto-0.2> Fix bug #8036

Stephan Arts noreply at xfce.org
Sun Oct 23 19:14:07 CEST 2011


Updating branch refs/heads/ristretto-0.2
         to 2097bf66d16136ba67396d489aae3e2a6189bea8 (commit)
       from eab7e6b87a2eee712db6fb1cabd0d61bdba2b156 (commit)

commit 2097bf66d16136ba67396d489aae3e2a6189bea8
Author: Stephan Arts <stephan at xfce.org>
Date:   Sun Oct 23 07:34:55 2011 +0200

    Fix bug #8036
    
    Conflicts:
    
    	src/image_viewer.c

 src/image_viewer.c |   50 +++++++++++++++++++++++++-------------------------
 1 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/src/image_viewer.c b/src/image_viewer.c
index 2154f08..678fc2b 100644
--- a/src/image_viewer.c
+++ b/src/image_viewer.c
@@ -1745,34 +1745,34 @@ cb_rstto_image_viewer_queued_repaint (RsttoImageViewer *viewer)
                     subpixbuf_y_offset,
                     subpixbuf_width,
                     subpixbuf_height);
-
-            switch (viewer->priv->orientation)
+            if (NULL != tmp_pixbuf)
             {
-                case RSTTO_IMAGE_VIEWER_ORIENT_180:
-                    tmp_pixbuf2 = gdk_pixbuf_rotate_simple (tmp_pixbuf, GDK_PIXBUF_ROTATE_UPSIDEDOWN);
-                    g_object_unref (tmp_pixbuf);
-                    tmp_pixbuf = tmp_pixbuf2;
-                    break;
-                case RSTTO_IMAGE_VIEWER_ORIENT_270:
-                    tmp_pixbuf2 = gdk_pixbuf_rotate_simple (tmp_pixbuf, GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE);
-                    g_object_unref (tmp_pixbuf);
-                    tmp_pixbuf = tmp_pixbuf2;
-                    break;
-                case RSTTO_IMAGE_VIEWER_ORIENT_90:
-                    tmp_pixbuf2 = gdk_pixbuf_rotate_simple (tmp_pixbuf, GDK_PIXBUF_ROTATE_CLOCKWISE);
-                    g_object_unref (tmp_pixbuf);
-                    tmp_pixbuf = tmp_pixbuf2;
-                    break;
-                case RSTTO_IMAGE_VIEWER_ORIENT_NONE:
-                    break;
-            }
+                switch (viewer->priv->orientation)
+                {
+                    case RSTTO_IMAGE_VIEWER_ORIENT_180:
+                        tmp_pixbuf2 = gdk_pixbuf_rotate_simple (tmp_pixbuf, GDK_PIXBUF_ROTATE_UPSIDEDOWN);
+                        g_object_unref (tmp_pixbuf);
+                        tmp_pixbuf = tmp_pixbuf2;
+                        break;
+                    case RSTTO_IMAGE_VIEWER_ORIENT_270:
+                        tmp_pixbuf2 = gdk_pixbuf_rotate_simple (tmp_pixbuf, GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE);
+                        g_object_unref (tmp_pixbuf);
+                        tmp_pixbuf = tmp_pixbuf2;
+                        break;
+                    case RSTTO_IMAGE_VIEWER_ORIENT_90:
+                        tmp_pixbuf2 = gdk_pixbuf_rotate_simple (tmp_pixbuf, GDK_PIXBUF_ROTATE_CLOCKWISE);
+                        g_object_unref (tmp_pixbuf);
+                        tmp_pixbuf = tmp_pixbuf2;
+                        break;
+                }
 
-            viewer->priv->dst_pixbuf = gdk_pixbuf_scale_simple (tmp_pixbuf,
-                                       (gint)(gdk_pixbuf_get_width(tmp_pixbuf) * relative_scale),
-                                       (gint)(gdk_pixbuf_get_height(tmp_pixbuf) * relative_scale),
-                                       GDK_INTERP_BILINEAR);
+                viewer->priv->dst_pixbuf = gdk_pixbuf_scale_simple (tmp_pixbuf,
+                                           (gint)(gdk_pixbuf_get_width(tmp_pixbuf) * relative_scale),
+                                           (gint)(gdk_pixbuf_get_height(tmp_pixbuf) * relative_scale),
+                                           GDK_INTERP_BILINEAR);
 
-            g_object_unref (tmp_pixbuf);
+                g_object_unref (tmp_pixbuf);
+            }
         }
 
         /* 


More information about the Xfce4-commits mailing list