From: Daniel Stone Date: Tue, 11 Jun 2019 10:32:14 +0000 (+0100) Subject: weston: Properly test for output-creation failure X-Git-Tag: upstream/9.0.0~553 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=814335821eb0fb5e74ec031c0cf68399e1dd370a;p=platform%2Fupstream%2Fweston.git 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 --- 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; }