diff options
author | Daniel Stone <daniels@collabora.com> | 2019-06-11 11:32:14 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-06-19 07:44:51 +0000 |
commit | a219af3858e4c0a208647f6863e530b739f9b583 (patch) | |
tree | 753466922a5df9843233ac1aa7eceb41180a78f4 | |
parent | 89a105444eac850aa383bc8d4c3d36cd5d926451 (diff) | |
download | weston-a219af3858e4c0a208647f6863e530b739f9b583.tar.gz |
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>
(cherry picked from commit 814335821eb0fb5e74ec031c0cf68399e1dd370a)
-rw-r--r-- | compositor/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compositor/main.c b/compositor/main.c index 4b462e71..518248cb 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; } |