Commit Diff


commit - a72dc2fec277bb517adcb98edfb18f469333d980
commit + 61c3095f2f9b35a0b330b37c172daefae0278663
blob - c0a15cc0a8c9624ca2481a53609863d82830a70f
blob + 267659f3835c9da586a022f170280e4229beaa80
--- dwm.c
+++ dwm.c
@@ -1693,7 +1693,8 @@ updategeom(void) {
 #endif /* XINERAMA */
 	/* allocate monitor(s) for the new geometry setup */
 	for(i = 0; i < n; i++) {
-		m = (Monitor *)malloc(sizeof(Monitor));
+		if(!(m = (Monitor *)malloc(sizeof(Monitor))))
+			die("fatal: could not malloc() %u bytes\n", sizeof(Monitor));
 		m->next = newmons;
 		newmons = m;
 	}