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.
This commit is contained in:
Tony Crisci 2014-04-28 18:21:29 -04:00 committed by Michael Stapelberg
parent 3171d7ebe5
commit 7a5cf4aa44
1 changed files with 2 additions and 1 deletions

View File

@ -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();