git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30510
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxPrintData::wxPrintData(const wxPrintData& printData)
: wxObject()
{
+ m_nativeData = NULL;
(*this) = printData;
}
m_printMode = data.m_printMode;
m_filename = data.m_filename;
- // UnRef old m_nativeData
- m_nativeData->m_ref--;
- if (m_nativeData->m_ref == 0)
- delete m_nativeData;
+ // UnRef old m_nativeData
+ if (m_nativeData)
+ {
+ m_nativeData->m_ref--;
+ if (m_nativeData->m_ref == 0)
+ delete m_nativeData;
+ }
// Set Ref new one
m_nativeData = data.GetNativeData();
m_nativeData->m_ref++;