From 87caf0d3aeb07afd25fc5424de525d74c7a8da44 Mon Sep 17 00:00:00 2001 From: Jody Goldberg Date: Sat, 21 Jun 2008 00:53:17 +0000 Subject: [PATCH] Fix life cycle to avoid crash. [#536966] 2008-06-20 Jody Goldberg * gtk/gtkprintoperation-win32.c (gtk_print_run_page_setup_dialog) : Fix life cycle to avoid crash. [#536966] svn path=/trunk/; revision=20660 --- ChangeLog | 5 +++++ gtk/gtkprintoperation-win32.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e592b4713..fa34c435bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-20 Jody Goldberg + + * gtk/gtkprintoperation-win32.c (gtk_print_run_page_setup_dialog) : + Fix life cycle to avoid crash. [#536966] + 2008-06-20 Hans Breuer * gtk/gtkmenuitem.c gtk/gtkmessagedialog.c gtk/gtkplug.c : must return diff --git a/gtk/gtkprintoperation-win32.c b/gtk/gtkprintoperation-win32.c index 53732980f4..d306a8ad63 100644 --- a/gtk/gtkprintoperation-win32.c +++ b/gtk/gtkprintoperation-win32.c @@ -1867,9 +1867,6 @@ gtk_print_run_page_setup_dialog (GtkWindow *parent, devmode_to_settings (settings, pagesetupdlg->hDevMode); } - if (free_settings) - g_object_unref (settings); - if (res) { gtk_page_setup_set_orientation (page_setup, @@ -1906,6 +1903,9 @@ gtk_print_run_page_setup_dialog (GtkWindow *parent, unit); } + if (free_settings) + g_object_unref (settings); + return page_setup; }