mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 01:48:00 +02:00
backend-headless: NULL check after wl_event_loop_add_timer
Running weston with headless backend will segfault if wl_event_loop_add_timer fails Closes #102 Signed-off-by: Ben Lorenz <bnlrnz@gmail.com>
This commit is contained in:
parent
a79c917466
commit
cf83b48be4
1 changed files with 5 additions and 0 deletions
|
|
@ -255,6 +255,11 @@ headless_output_enable(struct weston_output *base)
|
|||
output->finish_frame_timer =
|
||||
wl_event_loop_add_timer(loop, finish_frame_handler, output);
|
||||
|
||||
if (output->finish_frame_timer == NULL) {
|
||||
weston_log("failed to add finish frame timer\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch (b->renderer_type) {
|
||||
case HEADLESS_GL:
|
||||
ret = headless_output_enable_gl(output);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue