]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
blind compilation fix for wxUSE_STL==1 (bug 985662)
[wxWidgets.git] / src / common / wincmn.cpp
index 45d4fbf8a07d949cfde2b190cffde3e5a0636427..6d6c0342174a0f1b58403311470cc2c4a7f05ee2 100644 (file)
@@ -2437,14 +2437,15 @@ void wxWindowBase::DoMoveInTabOrder(wxWindow *win, MoveKind move)
 
     // unfortunately, when wxUSE_STL == 1 DetachNode() is not implemented so we
     // can't just move the node around
-    siblings.DeleteObject(this);
-    if ( move == MoveBefore || ((i = i->GetNext()) != NULL) )
+    wxWindow *self = (wxWindow *)this;
+    siblings.DeleteObject(self);
+    if ( move == MoveBefore || ((i = i->GetNext()) != siblings.end()) )
     {
-        siblings.Insert(i, this);
+        siblings.Insert(i, self);
     }
     else // MoveAfter and win was the last sibling
     {
-        siblings.Append(this);
+        siblings.Append(self);
     }
 }