From 89bae74a323b0e83d9a24fd2c3806deba645651c Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 13 May 2012 01:53:57 +0200 Subject: [PATCH] MIDORI_EVENT_NEW_TAB must check evt != NULL In Ubuntu 12.04 Unity global menu evt is NULL --- midori/midori-platform.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/midori/midori-platform.h b/midori/midori-platform.h index e974ed81..88168688 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" -- 2.39.5