aboutsummaryrefslogtreecommitdiff
path: root/examples/compositor
diff options
context:
space:
mode:
Diffstat (limited to 'examples/compositor')
-rw-r--r--examples/compositor/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/compositor/main.c b/examples/compositor/main.c
index 243b1837..8a9de2f9 100644
--- a/examples/compositor/main.c
+++ b/examples/compositor/main.c
@@ -83,6 +83,10 @@ int main() {
compositor_init(&compositor);
state.renderer = wlr_gles2_renderer_init(compositor.backend);
+ if (!state.renderer) {
+ wlr_log(L_ERROR, "Could not start compositor, OOM");
+ exit(EXIT_FAILURE);
+ }
wl_display_init_shm(compositor.display);
wl_compositor_init(compositor.display, &state.compositor, state.renderer);
state.wl_shell = wlr_wl_shell_create(compositor.display);