[Xfce4-commits] <midori:master> MIDORI_EVENT_NEW_TAB must check evt != NULL

Christian Dywan noreply at xfce.org
Sun May 13 02:24:03 CEST 2012


Updating branch refs/heads/master
         to 89bae74a323b0e83d9a24fd2c3806deba645651c (commit)
       from cf1321fe215155be59250edef3dbac2c593359f9 (commit)

commit 89bae74a323b0e83d9a24fd2c3806deba645651c
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun May 13 01:53:57 2012 +0200

    MIDORI_EVENT_NEW_TAB must check evt != NULL
    
    In Ubuntu 12.04 Unity global menu evt is NULL

 midori/midori-platform.h |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/midori/midori-platform.h b/midori/midori-platform.h
index e974ed8..8816868 100644
--- a/midori/midori-platform.h
+++ b/midori/midori-platform.h
@@ -33,9 +33,10 @@
 #endif
 
 #define MIDORI_EVENT_NEW_TAB(evt) \
-    ((((GdkEventButton*)evt)->button == 1 \
-     && MIDORI_MOD_NEW_TAB(((GdkEventButton*)evt)->state)) \
-    || (((GdkEventButton*)evt)->button == 2))
+    (evt != NULL \
+     && ((((GdkEventButton*)evt)->button == 1 \
+       && MIDORI_MOD_NEW_TAB(((GdkEventButton*)evt)->state)) \
+     || (((GdkEventButton*)evt)->button == 2)))
 
 #ifndef G_OS_WIN32
     #define MIDORI_MODULE_PREFIX "lib"


More information about the Xfce4-commits mailing list