From: Michael Stapelberg Date: Mon, 27 Jul 2009 22:43:52 +0000 (+0200) Subject: Bugfix: Fix NULL-pointer dereferencing introduced by commit 874941 (Thanks tsdh) X-Git-Tag: 3.c~46 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=33e536113d1cde99b8396907a9b8b62a60e978a1;p=i3%2Fi3 Bugfix: Fix NULL-pointer dereferencing introduced by commit 874941 (Thanks tsdh) --- diff --git a/src/util.c b/src/util.c index 108bf4a1..48bf43a0 100644 --- a/src/util.c +++ b/src/util.c @@ -369,7 +369,7 @@ void set_focus(xcb_connection_t *conn, Client *client, bool set_anyways) { /* If the last client was a floating client, we need to go to the next * tiling client in stack and re-decorate it. */ - if (client_is_floating(old_client)) { + if (old_client != NULL && client_is_floating(old_client)) { LOG("Coming from floating client, searching next tiling...\n"); Client *current; SLIST_FOREACH(current, &(client->workspace->focus_stack), focus_clients) {