Release old print settings object prior to storing a new one

Old GtkPrintSettings object should be released before copying its new
instance.

See #14233.
This commit is contained in:
Artur Wieczorek 2017-05-29 00:50:36 +02:00
parent de047e1ad9
commit fe7854933a

View File

@ -584,7 +584,13 @@ bool wxGtkPrintNativeData::TransferFrom( const wxPrintData &data )
void wxGtkPrintNativeData::SetPrintConfig( GtkPrintSettings * config )
{
if (config)
{
if ( m_config )
{
g_object_unref(m_config);
}
m_config = gtk_print_settings_copy(config);
}
}
// Extract page setup from settings.