[nautilus] Don't crash if parent button_press_event is NULL (#582457)
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [nautilus] Don't crash if parent button_press_event is NULL (#582457)
- Date: Wed, 13 May 2009 07:43:05 -0400 (EDT)
commit 5fde2c7156b5bb8c0411bdbe649dd08172853d3a
Author: Alexander Larsson <alexl redhat com>
Date: Wed May 13 13:41:45 2009 +0200
Don't crash if parent button_press_event is NULL (#582457)
This fixes a crash when you press on the empty area of the toolbars.
---
src/nautilus-navigation-window.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c
index 04d0073..f698dfc 100644
--- a/src/nautilus-navigation-window.c
+++ b/src/nautilus-navigation-window.c
@@ -991,18 +991,20 @@ nautilus_navigation_window_button_press_event (GtkWidget *widget,
{
NautilusNavigationWindow *window;
gboolean handled;
-
+
handled = FALSE;
window = NAUTILUS_NAVIGATION_WINDOW (widget);
-
+
if (mouse_extra_buttons && (event->button == mouse_back_button)) {
nautilus_navigation_window_go_back (window);
handled = TRUE;
} else if (mouse_extra_buttons && (event->button == mouse_forward_button)) {
nautilus_navigation_window_go_forward (window);
handled = TRUE;
- } else {
+ } else if (GTK_WIDGET_CLASS (nautilus_navigation_window_parent_class)->button_press_event) {
handled = GTK_WIDGET_CLASS (nautilus_navigation_window_parent_class)->button_press_event (widget, event);
+ } else {
+ handled = FALSE;
}
return handled;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]