From: Christian Dywan Date: Sat, 12 May 2012 23:53:57 +0000 (+0200) Subject: MIDORI_EVENT_NEW_TAB must check evt != NULL X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89bae74a323b0e83d9a24fd2c3806deba645651c;p=midori MIDORI_EVENT_NEW_TAB must check evt != NULL In Ubuntu 12.04 Unity global menu evt is NULL --- 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"