X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=spectrwm.c;h=e5a8a02d8a885e8bb4f49f393336059d7b771711;hb=3b291e14599f33b779c499c57745238ad46ea90c;hp=b36aee19ee0d44853c7cf5e0a5851d4adfbb9a7b;hpb=27b329267cb4709ee2c72aa0bd88379373d8df69;p=spectrwm.git diff --git a/spectrwm.c b/spectrwm.c index b36aee1..e5a8a02 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -841,7 +841,7 @@ teardown_ewmh(void) pc = xcb_get_property(conn, 0, screens[i].root, sup_check, XCB_ATOM_WINDOW, 0, 1); pr = xcb_get_property_reply(conn, pc, NULL); - if (pr->format == sup_check) { + if (pr && pr->format == sup_check) { id = *((xcb_window_t *)xcb_get_property_value(pr)); xcb_destroy_window(conn, id); @@ -6443,7 +6443,7 @@ get_ws_idx(xcb_window_t id) xcb_get_property(conn, 0, id, a_swm_ws, XCB_ATOM_STRING, 0, SWM_PROPLEN), NULL); - if (gpr->type) { + if (gpr && gpr->type) { proplen = xcb_get_property_value_length(gpr); if (proplen > 0) { prop = malloc(proplen + 1);