projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c9c180
)
filechooserportal: Take a ref on transient-for
author
Matthias Clasen
<mclasen@redhat.com>
Thu, 7 Oct 2021 02:37:45 +0000
(22:37 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Sun, 31 Oct 2021 21:52:04 +0000
(17:52 -0400)
This may fix a crash that has been reported in
file_chooser_portal_data_free.
Fixes: #4314
gtk/gtkfilechoosernativeportal.c
patch
|
blob
|
history
diff --git
a/gtk/gtkfilechoosernativeportal.c
b/gtk/gtkfilechoosernativeportal.c
index d65229f6ef78da9d952138ca5aa0d2eab222a281..d31337931e99889e4f887e597f0772275630d81f 100644
(file)
--- a/
gtk/gtkfilechoosernativeportal.c
+++ b/
gtk/gtkfilechoosernativeportal.c
@@
-79,6
+79,8
@@
filechooser_portal_data_free (FilechooserPortalData *data)
if (data->exported_window)
gtk_window_unexport_handle (data->exported_window);
+ g_clear_object (&data->exported_window);
+
g_free (data->portal_handle);
g_free (data);
@@
-501,7
+503,7
@@
gtk_file_chooser_native_portal_show (GtkFileChooserNative *self,
}
else
{
- data->exported_window =
transient_for
;
+ data->exported_window =
g_object_ref (transient_for)
;
}
}
else