From: Tony Crisci Date: Mon, 28 Apr 2014 22:21:29 +0000 (-0400) Subject: Bugfix: ipc window event crash with no window X-Git-Tag: 4.8~61 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7a5cf4aa44446aa54047d85fdeb5b9764a839c6e;p=i3%2Fi3 Bugfix: ipc window event crash with no window The log message at the top of ipc_send_window_event would segfault when no xcb window is present, such as for a split container. The log now shows the con id which is more relevant anyway. --- diff --git a/src/ipc.c b/src/ipc.c index 82ab1428..5f668b14 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -1067,7 +1067,8 @@ void ipc_send_workspace_focus_event(Con *current, Con *old) { * also the window container, in "container". */ void ipc_send_window_event(const char *property, Con *con) { - DLOG("Issue IPC window %s event for X11 window 0x%08x\n", property, con->window->id); + DLOG("Issue IPC window %s event (con = %p, window = 0x%08x)\n", + property, con, (con->window ? con->window->id : XCB_WINDOW_NONE)); setlocale(LC_NUMERIC, "C"); yajl_gen gen = ygenalloc();