]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk/dataform.h
extract event handler body in a separate function instead of using a hack to call...
[wxWidgets.git] / include / wx / gtk / dataform.h
index 1fc8372227b8beee615eaa89c1858d4ae44eecfa..86e0cd783804eb16b4c6d63e5e597e2d6dbaa64a 100644 (file)
@@ -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; }