[gimp/gimp-2-8] app: don't pass a NULL widget to gtk_widget_event



commit 5d2933c51caa10c088c061187d79d78aa57699ba
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Thu Jul 5 18:07:57 2012 +0200

    app: don't pass a NULL widget to gtk_widget_event
    
    <Alt>C C <Ctrl>1 <ESC> used to print:
    
    (gimp-2.8:1): Gtk-CRITICAL **: IA__gtk_widget_event:
                    assertion `GTK_IS_WIDGET (widget)' failed

 app/tools/gimpcurvestool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/tools/gimpcurvestool.c b/app/tools/gimpcurvestool.c
index f2f6603..334f1d5 100644
--- a/app/tools/gimpcurvestool.c
+++ b/app/tools/gimpcurvestool.c
@@ -313,7 +313,7 @@ gimp_curves_tool_key_press (GimpTool    *tool,
 {
   GimpCurvesTool *c_tool = GIMP_CURVES_TOOL (tool);
 
-  if (gtk_widget_event (c_tool->graph, (GdkEvent *) kevent))
+  if (c_tool->graph && gtk_widget_event (c_tool->graph, (GdkEvent *) kevent))
     return TRUE;
 
   return GIMP_TOOL_CLASS (parent_class)->key_press (tool, kevent, display);



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