[nautilus/gnome-2-28] Avoid crash when holding space bar on focused navigation buttons
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-2-28] Avoid crash when holding space bar on focused navigation buttons
- Date: Tue, 20 Oct 2009 11:26:01 +0000 (UTC)
commit 5cfa20efb636fcacb1fcc227be751da0126ff98b
Author: Nelson BenÃtez León <nbenitezl+gnome gmail com>
Date: Fri May 1 00:26:00 2009 +0200
Avoid crash when holding space bar on focused navigation buttons
Fixes bgo#580926
src/nautilus-navigation-window-menus.c | 5 +++++
src/nautilus-window-menus.c | 5 +++++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-navigation-window-menus.c b/src/nautilus-navigation-window-menus.c
index ec754be..beaf1aa 100644
--- a/src/nautilus-navigation-window-menus.c
+++ b/src/nautilus-navigation-window-menus.c
@@ -77,6 +77,11 @@ should_open_in_new_tab (void)
GdkEvent *event;
event = gtk_get_current_event ();
+
+ if (event == NULL) {
+ return FALSE;
+ }
+
if (event->type == GDK_BUTTON_PRESS || event->type == GDK_BUTTON_RELEASE) {
return event->button.button == 2;
}
diff --git a/src/nautilus-window-menus.c b/src/nautilus-window-menus.c
index 506d592..b6927e4 100644
--- a/src/nautilus-window-menus.c
+++ b/src/nautilus-window-menus.c
@@ -118,6 +118,11 @@ should_open_in_new_tab (void)
GdkEvent *event;
event = gtk_get_current_event ();
+
+ if (event == NULL) {
+ return FALSE;
+ }
+
if (event->type == GDK_BUTTON_PRESS || event->type == GDK_BUTTON_RELEASE) {
return event->button.button == 2;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]