From 166ad34423e6d374641590802ff5f5e9f7e831ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 13 Sep 2022 18:18:00 +0200 Subject: [PATCH] color-profile: Don't try to remove the wrong profile on finalize If our profile wasn't fully initialized, we'd try to clean it up, in an attempt to handle race conditions by finding synchronously then cleaning it up, but don't attempt this if the profile is ready, as that means we didn't create one in the first place. Part-of: --- src/backends/meta-color-profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/meta-color-profile.c b/src/backends/meta-color-profile.c index be131bb02..c500e57e6 100644 --- a/src/backends/meta-color-profile.c +++ b/src/backends/meta-color-profile.c @@ -122,7 +122,7 @@ meta_color_profile_finalize (GObject *object) CdProfile *cd_profile; cd_profile = color_profile->cd_profile; - if (!cd_profile) + if (!cd_profile && !color_profile->is_ready) { g_autoptr (GError) error = NULL;