X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cf2810aa394d47a43489d6138edf0497c389a22c..78fd3d12bc0f956d755a70564305863531010c34:/include/wx/windowid.h

diff --git a/include/wx/windowid.h b/include/wx/windowid.h
index 4b2e3e171c..e16b4534ab 100644
--- a/include/wx/windowid.h
+++ b/include/wx/windowid.h
@@ -72,7 +72,8 @@ public:
 
     wxWindowIDRef& operator=(const wxWindowIDRef& id)
     {
-        Assign(id.m_id);
+        if (&id != this)
+            Assign(id.m_id);
         return *this;
     }