Skip to content

Commit

Permalink
check status of Window * before grabbing _NET_WM_NAME property (possi…
Browse files Browse the repository at this point in the history
…ble fix for #14)
  • Loading branch information
woodruffw committed Feb 17, 2015
1 parent a3e320a commit f0915aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plat/linux/detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ void detect_wm(void)
0, KB, false, XA_WINDOW, &actual_type, &actual_format, &nitems,
&bytes, (unsigned char **) &wm_check_window)))
{
if (!(XGetWindowProperty(disp, *wm_check_window,
if (wm_check_window && !(XGetWindowProperty(disp, *wm_check_window,
XInternAtom(disp, "_NET_WM_NAME", true), 0, KB, false,
XInternAtom(disp, "UTF8_STRING", true), &actual_type,
&actual_format, &nitems, &bytes, (unsigned char **) &wm_name)))
Expand Down

0 comments on commit f0915aa

Please sign in to comment.