- LOG("raising above frame %p / child %p\n", last_focused->frame, last_focused->child);
- uint32_t values[] = { last_focused->frame, XCB_STACK_MODE_ABOVE };
- xcb_configure_window(conn, client->frame, XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE, values);
+ if (last_focused != NULL) {
+ LOG("raising above frame %p / child %p\n", last_focused->frame, last_focused->child);
+ uint32_t values[] = { last_focused->frame, XCB_STACK_MODE_ABOVE };
+ xcb_configure_window(conn, client->frame, XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE, values);
+ }