X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/45344b388060ed6cb27b494cf553d7223bd3e33b..b822bdc032e508858596a36cf5f344d60bf26f34:/include/wx/gtk/dataform.h diff --git a/include/wx/gtk/dataform.h b/include/wx/gtk/dataform.h index 1fc8372227..86e0cd7838 100644 --- a/include/wx/gtk/dataform.h +++ b/include/wx/gtk/dataform.h @@ -30,7 +30,14 @@ public: wxDataFormat( const wxCStrData& id ) { InitFromString(id); } wxDataFormat& operator=(const wxDataFormat& format) - { m_type = format.m_type; m_format = format.m_format; return *this; } + { + if (&format != this) + { + m_type = format.m_type; + m_format = format.m_format; + } + return *this; + } wxDataFormat& operator=(NativeFormat format) { SetId(format); return *this; }