restricting number of mons by length of monsyms

This commit is contained in:
Anselm R Garbe
2009-07-09 11:21:06 +01:00
parent 1724f7fa43
commit 5e408d8ff6
2 changed files with 3 additions and 1 deletions

2
dwm.c
View File

@ -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))))