printunixdialog: release the parent folder after the check

Backported from GTK 3 commit 7fbf6a67a2 by Matthias Clasen.
This commit is contained in:
Daemonratte 2026-10-15 17:39:58 +02:00
commit 8a4c99379b

View file

@ -463,10 +463,14 @@ error_dialogs (GtkPrintUnixDialog *print_dialog,
if (file != NULL &&
g_file_query_exists (file, NULL))
{
GFile *parent;
toplevel = get_toplevel (GTK_WIDGET (print_dialog));
basename = g_file_get_basename (file);
dirname = g_file_get_parse_name (g_file_get_parent (file));
parent = g_file_get_parent (file);
dirname = g_file_get_parse_name (parent);
g_object_unref (parent);
dialog = gtk_message_dialog_new (toplevel,
GTK_DIALOG_MODAL |