[gimp] app: gui_free_progress() should accept any GimpProcess widget.



commit 6c1a0e8be74fbdfae75d9bfd5ddbea4b591a7e0e
Author: Jehan <jehan girinstud io>
Date:   Thu May 6 00:07:37 2021 +0200

    app: gui_free_progress() should accept any GimpProcess widget.
    
    Simply it should free only GimpProgressDialog as these would be
    dedicated dialog (with no meaning once progression is done), and leave
    alone other GimpProgress widgets. In any case, it should not output
    CRITICAL errors on these.
    
    Fixing the following CRITICAL:
    > GIMP-CRITICAL: gui_free_progress: assertion 'GIMP_IS_PROGRESS_DIALOG (progress)' failed
    
    When dropping an image on the toolbox.

 app/gui/gui-vtable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/app/gui/gui-vtable.c b/app/gui/gui-vtable.c
index 3545db3bdd..a16a1c9322 100644
--- a/app/gui/gui-vtable.c
+++ b/app/gui/gui-vtable.c
@@ -569,7 +569,7 @@ static void
 gui_free_progress (Gimp          *gimp,
                    GimpProgress  *progress)
 {
-  g_return_if_fail (GIMP_IS_PROGRESS_DIALOG (progress));
+  g_return_if_fail (GIMP_IS_PROGRESS (progress));
 
   if (GIMP_IS_PROGRESS_DIALOG (progress))
     gtk_widget_destroy (GTK_WIDGET (progress));


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