mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
printoperation-unix: Fix a use-after-free
It turns out that finish_print destroys the PrintResponseData, so we can't access it afterwards.
This commit is contained in:
parent
3b9a8194a5
commit
09ea880a43
@ -650,6 +650,9 @@ handle_print_response (GtkWidget *dialog,
|
||||
gtk_print_operation_set_print_settings (rdata->op, settings);
|
||||
g_signal_emit_by_name (rdata->op, "custom-widget-apply", rdata->op->priv->custom_widget);
|
||||
}
|
||||
|
||||
if (rdata->loop)
|
||||
g_main_loop_quit (rdata->loop);
|
||||
|
||||
finish_print (rdata, printer, page_setup, settings, page_setup_set);
|
||||
|
||||
@ -657,9 +660,6 @@ handle_print_response (GtkWidget *dialog,
|
||||
g_object_unref (settings);
|
||||
|
||||
gtk_window_destroy (GTK_WINDOW (pd));
|
||||
|
||||
if (rdata->loop)
|
||||
g_main_loop_quit (rdata->loop);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user