gimp r27587 - in branches/gimp-2-6: . app/display



Author: martinn
Date: Sun Nov  9 19:59:40 2008
New Revision: 27587
URL: http://svn.gnome.org/viewvc/gimp?rev=27587&view=rev

Log:
Merged from trunk:

* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_update_rulers): Avoid critical warnings
when converting an image window with a unit other than pixels into
a the empty image window. Probably fixes some of the crashes
reported by Windows users.


Modified:
   branches/gimp-2-6/ChangeLog
   branches/gimp-2-6/app/display/gimpdisplayshell-scale.c

Modified: branches/gimp-2-6/app/display/gimpdisplayshell-scale.c
==============================================================================
--- branches/gimp-2-6/app/display/gimpdisplayshell-scale.c	(original)
+++ branches/gimp-2-6/app/display/gimpdisplayshell-scale.c	Sun Nov  9 19:59:40 2008
@@ -215,19 +215,22 @@
                                                         &scaled_viewport_offset_x,
                                                         &scaled_viewport_offset_y);
 
-  horizontal_lower -= img2real (shell, TRUE,
-                                FUNSCALEX (shell,
-                                           (gdouble) scaled_viewport_offset_x));
-  horizontal_upper -= img2real (shell, TRUE,
-                                FUNSCALEX (shell,
-                                           (gdouble) scaled_viewport_offset_x));
-
-  vertical_lower   -= img2real (shell, FALSE,
-                                FUNSCALEY (shell,
-                                           (gdouble) scaled_viewport_offset_y));
-  vertical_upper   -= img2real (shell, FALSE,
-                                FUNSCALEY (shell,
-                                           (gdouble) scaled_viewport_offset_y));
+  if (image)
+    {
+      horizontal_lower -= img2real (shell, TRUE,
+                                    FUNSCALEX (shell,
+                                               (gdouble) scaled_viewport_offset_x));
+      horizontal_upper -= img2real (shell, TRUE,
+                                    FUNSCALEX (shell,
+                                               (gdouble) scaled_viewport_offset_x));
+
+      vertical_lower   -= img2real (shell, FALSE,
+                                    FUNSCALEY (shell,
+                                               (gdouble) scaled_viewport_offset_y));
+      vertical_upper   -= img2real (shell, FALSE,
+                                    FUNSCALEY (shell,
+                                               (gdouble) scaled_viewport_offset_y));
+    }
 
 
   /* Finally setup the actual rulers */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]