]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/propgrid/propgridpagestate.h
fix wxSocket notifications under MSW after the last change
[wxWidgets.git] / include / wx / propgrid / propgridpagestate.h
index 64a2475d2d2d560e139654456c36950fe072c835..f8953663895c8ecb28f5c468308c89f953587791 100644 (file)
@@ -234,7 +234,8 @@ private:
     } \
     const CLASS& operator=( const CLASS& it ) \
     { \
-        Assign(it); \
+        if (this != &it) \
+            Assign(it); \
         return *this; \
     } \
     CLASS& operator++() { Next(); return *this; } \
@@ -359,9 +360,12 @@ public:
 #ifndef SWIG
     const wxPGVIterator& operator=( const wxPGVIterator& it )
     {
-        UnRef();
-        m_pIt = it.m_pIt;
-        m_pIt->IncRef();
+        if (this != &it)
+        {
+            UnRef();
+            m_pIt = it.m_pIt;
+            m_pIt->IncRef();
+        }
         return *this;
     }
 #endif