[gimp/cage: 58/130] app: gimp_display_shell_expose_region(): return if the canvas is not realized



commit 495dda8cd0b8a8aa5b8df81cec5e8963e95a2711
Author: Michael Natterer <mitch gimp org>
Date:   Sat Nov 13 22:58:43 2010 +0100

    app: gimp_display_shell_expose_region(): return if the canvas is not realized
    
    All GTK+ exposing functions do the same.

 app/display/gimpdisplayshell-expose.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-expose.c b/app/display/gimpdisplayshell-expose.c
index 7c98525..8c79f54 100644
--- a/app/display/gimpdisplayshell-expose.c
+++ b/app/display/gimpdisplayshell-expose.c
@@ -51,6 +51,9 @@ gimp_display_shell_expose_region (GimpDisplayShell *shell,
   g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
   g_return_if_fail (region != NULL);
 
+  if (! gtk_widget_get_realized (shell->canvas))
+    return;
+
 #ifdef USE_CAIRO_REGION
   {
     GdkRegion *gdk_region = gdk_region_new ();



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