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 <daniels@collabora.com>
dev
Daniel Stone 5 years ago committed by Simon Ser
parent a9278d28fc
commit 814335821e
  1. 2
      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;
}

Loading…
Cancel
Save