mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-27 03:36:31 +00:00
check failure of wlr_output_init_render
This commit is contained in:
parent
00e867d536
commit
901d2e2d9d
1 changed files with 6 additions and 3 deletions
9
dwl.c
9
dwl.c
|
@ -859,10 +859,13 @@ createmon(struct wl_listener *listener, void *data)
|
||||||
const MonitorRule *r;
|
const MonitorRule *r;
|
||||||
size_t i;
|
size_t i;
|
||||||
struct wlr_output_state state;
|
struct wlr_output_state state;
|
||||||
Monitor *m = wlr_output->data = ecalloc(1, sizeof(*m));
|
Monitor *m;
|
||||||
m->wlr_output = wlr_output;
|
|
||||||
|
|
||||||
wlr_output_init_render(wlr_output, alloc, drw);
|
if (!wlr_output_init_render(wlr_output, alloc, drw))
|
||||||
|
return;
|
||||||
|
|
||||||
|
m = wlr_output->data = ecalloc(1, sizeof(*m));
|
||||||
|
m->wlr_output = wlr_output;
|
||||||
|
|
||||||
for (i = 0; i < LENGTH(m->layers); i++)
|
for (i = 0; i < LENGTH(m->layers); i++)
|
||||||
wl_list_init(&m->layers[i]);
|
wl_list_init(&m->layers[i]);
|
||||||
|
|
Loading…
Reference in a new issue