changeset 17064:541c5ed54e90

Fix the commit from earlier today about null-widgets.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 12 May 2007 09:24:10 +0000
parents fdd1a73aa37e
children 9af44da5a6b8
files finch/libgnt/gntmain.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntmain.c	Sat May 12 02:50:27 2007 +0000
+++ b/finch/libgnt/gntmain.c	Sat May 12 09:24:10 2007 +0000
@@ -145,10 +145,7 @@
 	} else
 		return FALSE;
 
-	if (!widget)
-		return FALSE;
-
-	if (gnt_wm_process_click(wm, event, x, y, widget))
+	if (widget && gnt_wm_process_click(wm, event, x, y, widget))
 		return TRUE;
 	
 	if (event == GNT_LEFT_MOUSE_DOWN && widget && widget != wm->_list.window &&
@@ -180,7 +177,8 @@
 		offset = 0;
 	}
 
-	gnt_widget_clicked(widget, event, x, y);
+	if (widget)
+		gnt_widget_clicked(widget, event, x, y);
 	return TRUE;
 }