diff options
author | Florian Müllner <fmuellner@gnome.org> | 2013-11-19 19:44:30 +0100 |
---|---|---|
committer | Florian Müllner <fmuellner@gnome.org> | 2013-11-19 20:08:46 +0100 |
commit | 17f48baf3a08b96cb1cb9a4147aa41ee2e0f73cc (patch) | |
tree | 27de2a0395460042dc5b7489b6227d0cf18c126f | |
parent | 333661a9d8851ce31d54f4aadb7cefcbc0a2f05e (diff) | |
download | mutter-17f48baf3a08b96cb1cb9a4147aa41ee2e0f73cc.tar.gz |
display: Tweak code to work around a compiler warning
The compiler is not quite smart enough to figure out that the condition
for setting the "compositor" variable matches a later condition for
accessing it, so express this in a way the compiler will understand.
-rw-r--r-- | src/core/display.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/display.c b/src/core/display.c index 8e90af094..2a6779d9c 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -2042,7 +2042,7 @@ meta_display_handle_event (MetaDisplay *display, /* XXX -- we need to fill this in properly at some point... */ gboolean frame_was_receiver = FALSE; #ifdef HAVE_WAYLAND - MetaWaylandCompositor *compositor; + MetaWaylandCompositor *compositor = NULL; if (meta_is_wayland_compositor ()) { @@ -2293,7 +2293,7 @@ meta_display_handle_event (MetaDisplay *display, } #ifdef HAVE_WAYLAND - if (meta_is_wayland_compositor () && (display->grab_op == META_GRAB_OP_NONE)) + if (compositor && (display->grab_op == META_GRAB_OP_NONE)) { if (meta_wayland_compositor_handle_event (compositor, event)) return TRUE; |