[gtk+] mountoperation: Fix a crash



commit e8079df420e50b159ba9ba7484d04b4323251bc7
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 16 14:50:25 2018 -0500

    mountoperation: Fix a crash
    
    We only create the gesture when the dialog is needed,
    so don't free it unconditionally.

 gtk/gtkmountoperation.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c
index 4be287f..1bd74cc 100644
--- a/gtk/gtkmountoperation.c
+++ b/gtk/gtkmountoperation.c
@@ -231,7 +231,8 @@ gtk_mount_operation_finalize (GObject *object)
   if (priv->handler)
     g_object_unref (priv->handler);
 
-  g_object_unref (priv->multipress_gesture);
+  if (priv->multipress_gesture)
+    g_object_unref (priv->multipress_gesture);
 
   G_OBJECT_CLASS (gtk_mount_operation_parent_class)->finalize (object);
 }


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