compositor: Don't reuse previous return values 69/28869/1
authorMarius Vlad <marius.vlad@collabora.com>
Thu, 6 Apr 2023 07:59:37 +0000 (10:59 +0300)
committerMarius Vlad <marius.vlad@collabora.com>
Wed, 10 May 2023 16:20:51 +0000 (19:20 +0300)
In case we couldn't enable the output do not return early without
setting the proper return value. This causes an issue later one, because
the signal list isn't initalized, taking down the compositor with a crash.

Bug-AGL: SPEC-4734
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia5ebc226f6b8f702e710a5976c471d04302bcb00

src/compositor.c

index 60d5dd2..dc7ed4f 100644 (file)
@@ -838,7 +838,7 @@ remote_output_init(struct ivi_output *ivi_output,
                goto err;
        }
 
-       if (weston_output_enable(ivi_output->output) < 0) {
+       if ((ret = weston_output_enable(ivi_output->output)) < 0) {
                weston_log("Enabling remoted output \"%s\" failed.\n",
                                output_name);
                goto err;