[mutter] color-profile: Don't try to remove the wrong profile on finalize



commit 166ad34423e6d374641590802ff5f5e9f7e831ee
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Tue Sep 13 18:18:00 2022 +0200

    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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2622>

 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 be131bb02a..c500e57e69 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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]