Prevent a NULL pointer deference if monitor_create fails

This commit is contained in:
LemonBoy 2015-02-18 12:52:24 +01:00
parent 5186f68658
commit d32cd8bce9

3
bar.c
View File

@ -811,6 +811,9 @@ monitor_create_chain (xcb_rectangle_t *rects, const int num)
min(width, rects[i].width - left), min(width, rects[i].width - left),
rects[i].height); rects[i].height);
if (!mon)
break;
monitor_add(mon); monitor_add(mon);
width -= rects[i].width - left; width -= rects[i].width - left;