[sound-juicer/wip/hadess/fix-assert: 2/4] main: Fix warning when opening CD tray




commit 18ecf7e41d490fe6c1fae809e09ad4b0f8a26e2d
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Sep 8 11:51:31 2020 +0200

    main: Fix warning when opening CD tray
    
    If the disc's metadata was already fetched, then the application
    would already not be busy:
    (sound-juicer:17): GLib-GIO-CRITICAL **: g_application_unmark_busy: assertion 
'application->priv->busy_count > 0' failed

 src/sj-main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/sj-main.c b/src/sj-main.c
index f6781a5f..7f0db9c4 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -1709,7 +1709,8 @@ static void update_reading_status (gboolean status)
   } else {
 
     gtk_statusbar_pop(GTK_STATUSBAR(status_bar), 1);
-    g_application_unmark_busy (g_application_get_default ());
+    if (g_application_get_is_busy (g_application_get_default ()))
+      g_application_unmark_busy (g_application_get_default ());
   }
 }
 


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