MIDORI_EVENT_NEW_TAB must check evt != NULL

In Ubuntu 12.04 Unity global menu evt is NULL
This commit is contained in:
Christian Dywan 2012-05-13 01:53:57 +02:00
parent cf1321fe21
commit 89bae74a32

View file

@ -33,9 +33,10 @@
#endif #endif
#define MIDORI_EVENT_NEW_TAB(evt) \ #define MIDORI_EVENT_NEW_TAB(evt) \
((((GdkEventButton*)evt)->button == 1 \ (evt != NULL \
&& ((((GdkEventButton*)evt)->button == 1 \
&& MIDORI_MOD_NEW_TAB(((GdkEventButton*)evt)->state)) \ && MIDORI_MOD_NEW_TAB(((GdkEventButton*)evt)->state)) \
|| (((GdkEventButton*)evt)->button == 2)) || (((GdkEventButton*)evt)->button == 2)))
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32
#define MIDORI_MODULE_PREFIX "lib" #define MIDORI_MODULE_PREFIX "lib"