From 814335821eb0fb5e74ec031c0cf68399e1dd370a Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 11 Jun 2019 11:32:14 +0100 Subject: [PATCH] weston: Properly test for output-creation failure We were testing the wrong variable to see if output creation had failed: instead of testing the return of the function we'd just called, we were testing something we'd already checked earlier. Signed-off-by: Daniel Stone --- compositor/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compositor/main.c b/compositor/main.c index bf4062af..1289327b 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -1818,7 +1818,7 @@ wet_layoutput_create_output(struct wet_layoutput *lo, const char *name) output->output = weston_compositor_create_output(lo->compositor->compositor, name); - if (!output) { + if (!output->output) { free(output); return NULL; }