[gnome-calendar] window: Add weak pointer to import dialog



commit 440bb394988706f86808f0249a1aa546a7888d17
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Aug 16 19:07:35 2021 -0300

    window: Add weak pointer to import dialog
    
    Otherwise we crash the second time it's opened.

 src/gui/gcal-window.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/gui/gcal-window.c b/src/gui/gcal-window.c
index 0767db65..0057a9fe 100644
--- a/src/gui/gcal-window.c
+++ b/src/gui/gcal-window.c
@@ -1221,4 +1221,6 @@ gcal_window_import_files (GcalWindow  *self,
   self->import_dialog = gcal_import_dialog_new_for_files (self->context, files, n_files);
   gtk_window_set_transient_for (GTK_WINDOW (self->import_dialog), GTK_WINDOW (self));
   gtk_window_present (GTK_WINDOW (self->import_dialog));
+
+  g_object_add_weak_pointer (G_OBJECT (self->import_dialog), &self->import_dialog);
 }


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