Prevent a NULL pointer deference if monitor_create fails
This commit is contained in:
parent
5186f68658
commit
d32cd8bce9
3
bar.c
3
bar.c
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user