[libadwaita/libadwaita-1-0] style-manager: fix assert condition



commit 01173108f73f04413122b393f3f67ca8e4e6f7c0
Author: George Barrett <bob bob131 so>
Date:   Fri May 13 08:34:26 2022 +1000

    style-manager: fix assert condition
    
    Per-display AdwStyleManager instances are stored in a hash table,
    indexed by their display. The display is monitored for a close event
    so the corresponding style manager can be removed from the table,
    however it is guarded by an assert that will always fail. This commit
    removes the negation from the assert condition.
    
    Fixes 8f99e6226563cb6e85887d1aae1a0e41666a7639.
    
    
    (cherry picked from commit 93021770d055a7aebe98246f26ac9eb36b582f98)
    
    (cherry picked from commit 7590eb6178be0fa54919dab39a8d5064fcc7945f)

 src/adw-style-manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/adw-style-manager.c b/src/adw-style-manager.c
index bf9dd5b6..0289d0c7 100644
--- a/src/adw-style-manager.c
+++ b/src/adw-style-manager.c
@@ -95,7 +95,7 @@ warn_prefer_dark_theme (AdwStyleManager *self)
 static void
 unregister_display (GdkDisplay *display)
 {
-  g_assert (!g_hash_table_contains (display_style_managers, display));
+  g_assert (g_hash_table_contains (display_style_managers, display));
 
   g_hash_table_remove (display_style_managers, display);
 }


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