Commit 0f1bcb0f authored by Christian Persch's avatar Christian Persch Committed by Christian Persch

Don't leak the old page size when

2006-12-04  Christian Persch  <chpe@cvs.gnome.org>

	* gtk/gtkpagesetup.c: (gtk_page_setup_get_paper_size),
	(gtk_page_setup_set_paper_size): Don't leak the old page size when
parent c7945c95
2006-12-04 Christian Persch <chpe@cvs.gnome.org>
* gtk/gtkpagesetup.c: (gtk_page_setup_get_paper_size),
(gtk_page_setup_set_paper_size): Don't leak the old page size when
setting a new one. Bug #382314.
2006-12-03 Michael Natterer <mitch@gimp.org>
* gtk/gtktextview.c: remove FIXME #include that is no longer needed.
......
......@@ -163,6 +163,8 @@ gtk_page_setup_set_orientation (GtkPageSetup *setup,
GtkPaperSize *
gtk_page_setup_get_paper_size (GtkPageSetup *setup)
{
g_return_val_if_fail (GTK_IS_PAGE_SETUP (setup), NULL);
return setup->paper_size;
}
......@@ -181,7 +183,17 @@ void
gtk_page_setup_set_paper_size (GtkPageSetup *setup,
GtkPaperSize *size)
{
GtkPaperSize *old_size;
g_return_if_fail (GTK_IS_PAGE_SETUP (setup));
g_return_if_fail (size != NULL);
old_size = setup->paper_size;
setup->paper_size = gtk_paper_size_copy (size);
if (old_size)
gtk_paper_size_free (old_size);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment