[gtk/matthiasc/for-master] printeroptionwidget: Avoid a critical



commit 58fd969b2df3dfbd7c3f77a02ba1a8492060dca3
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon May 11 14:26:31 2020 -0400

    printeroptionwidget: Avoid a critical
    
    The new_location can be NULL, as we clearly
    knew earlier in the function. We've forgotten
    about that by the time we unref it :(

 gtk/gtkprinteroptionwidget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkprinteroptionwidget.c b/gtk/gtkprinteroptionwidget.c
index 7cff48186d..c291fe3ec2 100644
--- a/gtk/gtkprinteroptionwidget.c
+++ b/gtk/gtkprinteroptionwidget.c
@@ -526,7 +526,7 @@ dialog_response_callback (GtkDialog              *dialog,
       g_free (uri);
     }
 
-  g_object_unref (new_location);
+  g_clear_object (&new_location);
   g_clear_object (&priv->last_location);
 
   /* unblock the handler which was blocked in the filesave_choose_cb function */


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