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>
This commit is contained in:
+1
-1
@@ -1818,7 +1818,7 @@ wet_layoutput_create_output(struct wet_layoutput *lo, const char *name)
|
|||||||
output->output =
|
output->output =
|
||||||
weston_compositor_create_output(lo->compositor->compositor,
|
weston_compositor_create_output(lo->compositor->compositor,
|
||||||
name);
|
name);
|
||||||
if (!output) {
|
if (!output->output) {
|
||||||
free(output);
|
free(output);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user