From 5e408d8ff65c8609898ad792cdeeac443f28be7a Mon Sep 17 00:00:00 2001 From: Anselm R Garbe Date: Thu, 9 Jul 2009 11:21:06 +0100 Subject: restricting number of mons by length of monsyms --- dwm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dwm.c') diff --git a/dwm.c b/dwm.c index 17d5218c..fa5fdea3 100644 --- a/dwm.c +++ b/dwm.c @@ -1690,6 +1690,8 @@ updategeom(void) { if(XineramaIsActive(dpy)) info = XineramaQueryScreens(dpy, &n); #endif /* XINERAMA */ + if(n > LENGTH(monsyms)) + n = LENGTH(monsyms); /* allocate monitor(s) for the new geometry setup */ for(i = 0; i < n; i++) { if(!(m = (Monitor *)malloc(sizeof(Monitor)))) -- cgit v1.2.3