]> git.sur5r.net Git - i3/i3/commitdiff
Initialize output (fixes compiler warning)
authorMichael Stapelberg <michael@stapelberg.de>
Tue, 23 Aug 2011 23:34:56 +0000 (01:34 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Tue, 23 Aug 2011 23:34:56 +0000 (01:34 +0200)
i3bar/src/xcb.c

index e25bc95977b2e751cf1e85cccba6c5986d4c530e..57d21f7261fd0ed0b083468be28382c034edc789 100644 (file)
@@ -471,13 +471,17 @@ static void handle_client_message(xcb_client_message_event_t* event) {
             }
 
             DLOG("X window %08x requested docking\n", client);
-            i3_output *walk, *output;
+            i3_output *walk, *output = NULL;
             SLIST_FOREACH(walk, outputs, slist) {
                 if (!walk->active)
                     continue;
                 DLOG("using output %s\n", walk->name);
                 output = walk;
             }
+            if (output == NULL) {
+                ELOG("No output found\n");
+                return;
+            }
             xcb_reparent_window(xcb_connection,
                                 client,
                                 output->bar,