[libadwaita/wip/exalm/message-dialog-2: 1/2] message-dialog: Correctly handle multiple disposes




commit ba6d92a0a7fa8c14a9a597d848c09c011e94343e
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Jun 28 18:53:06 2022 +0400

    message-dialog: Correctly handle multiple disposes

 src/adw-message-dialog.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/adw-message-dialog.c b/src/adw-message-dialog.c
index 141cbf49..6a97a703 100644
--- a/src/adw-message-dialog.c
+++ b/src/adw-message-dialog.c
@@ -617,7 +617,10 @@ adw_message_dialog_dispose (GObject *object)
     priv->child = NULL;
   }
 
-  g_list_free_full (priv->responses, (GDestroyNotify) response_info_free);
+  if (priv->responses) {
+    g_list_free_full (priv->responses, (GDestroyNotify) response_info_free);
+    priv->responses = NULL;
+  }
 
   G_OBJECT_CLASS (adw_message_dialog_parent_class)->dispose (object);
 }


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