From ad9b3bc65d9e4802d2982bf09938783cfb7ee1b3 Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Tue, 18 Aug 2020 19:43:42 -0500 Subject: handle NULL return from backend_autocreate Fixes #44. --- dwl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dwl.c') diff --git a/dwl.c b/dwl.c index 8aa428b..357718f 100644 --- a/dwl.c +++ b/dwl.c @@ -1460,7 +1460,8 @@ setup(void) * backend uses the renderer, for example, to fall back to software cursors * if the backend does not support hardware cursors (some older GPUs * don't). */ - backend = wlr_backend_autocreate(dpy, NULL); + if (!(backend = wlr_backend_autocreate(dpy, NULL))) + BARF("couldn't create backend"); /* If we don't provide a renderer, autocreate makes a GLES2 renderer for us. * The renderer is responsible for defining the various pixel formats it -- cgit v1.2.3