X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d62c1e628d2e36f00dd1c703a41c2d41415c10cc..0b7dce5480b8cf7ce4368122744d853f7a684e34:/src/common/cmndata.cpp diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 8c1309a9df..4a02c49298 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -256,8 +256,11 @@ void wxPrintData::ConvertFromNative() m_nativeData->TransferTo( *this ) ; } -void wxPrintData::operator=(const wxPrintData& data) +wxPrintData& wxPrintData::operator=(const wxPrintData& data) { + if ( &data == this ) + return *this; + m_printNoCopies = data.m_printNoCopies; m_printCollate = data.m_printCollate; m_printOrientation = data.m_printOrientation; @@ -295,6 +298,8 @@ void wxPrintData::operator=(const wxPrintData& data) m_privData = new char[m_privDataLen]; memcpy( m_privData, data.GetPrivData(), m_privDataLen ); } + + return *this; } // Is this data OK for showing the print dialog?