Hiroyuki Ikezoe
ikezo****@users*****
Thu May 11 10:33:12 JST 2006
Index: kazehakase/src/dialogs/kz-print-dialog.c diff -u kazehakase/src/dialogs/kz-print-dialog.c:1.10 kazehakase/src/dialogs/kz-print-dialog.c:1.11 --- kazehakase/src/dialogs/kz-print-dialog.c:1.10 Thu Jul 14 11:52:33 2005 +++ kazehakase/src/dialogs/kz-print-dialog.c Thu May 11 10:33:12 2006 @@ -75,6 +75,19 @@ kz_print_dialog_class_init, kz_print_dialog_init, GTK_TYPE_DIALOG) +static void free_print_info (KzPrintDialog *print) +{ + if (print->info) + { + if (print->info->printer) + g_free(print->info->printer); + print->info->printer = NULL; + + g_free(print->info); + print->info = NULL; + } +} + static void kz_print_dialog_class_init (KzPrintDialogClass *klass) { @@ -307,16 +320,8 @@ print->kz = NULL; } - if (print->info) - { - if (print->info->printer) - g_free(print->info->printer); - print->info->printer = NULL; + free_print_info (print); - g_free(print->info); - print->info = NULL; - } - if (G_OBJECT_CLASS (parent_class)->dispose) G_OBJECT_CLASS (parent_class)->dispose(object); } @@ -482,6 +487,8 @@ info->to_page = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(priv->to_page)); + free_print_info (print); + print->info = info; return info;