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
1 changed files with 3 additions and 0 deletions

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),
rects[i].height);
if (!mon)
break;
monitor_add(mon);
width -= rects[i].width - left;