From: Anselm R Garbe Date: Fri, 18 Jul 2008 19:18:45 +0000 (+0100) Subject: potential crash fix if xinerama behaves broken, though I doubt it X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=6fad4c49f17f154b49846d379e347897b747f793;p=dwm.git potential crash fix if xinerama behaves broken, though I doubt it --- diff --git a/dwm.c b/dwm.c index 34bcd99..52bb9f1 100644 --- a/dwm.c +++ b/dwm.c @@ -1562,8 +1562,7 @@ updategeom(void) { XineramaScreenInfo *info = NULL; /* window area geometry */ - if(XineramaIsActive(dpy)) { - info = XineramaQueryScreens(dpy, &n); + if(XineramaIsActive(dpy) && (info = XineramaQueryScreens(dpy, &n))) { if(n > 1) { int di, x, y; unsigned int dui;