Catch attempts to create a window with itself as parent.

This doesn't happen often but when it does, the results are catastrophic and
not always easy to debug, so try catch this as soon as possible.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-12-08 00:37:10 +00:00
parent 97e5a1969f
commit e0fddcefb6
2 changed files with 15 additions and 1 deletions

View File

@@ -752,7 +752,7 @@ public:
bool IsDescendant(wxWindowBase* win) const;
// it doesn't really change parent, use Reparent() instead
void SetParent( wxWindowBase *parent ) { m_parent = (wxWindow *)parent; }
void SetParent( wxWindowBase *parent );
// change the real parent of this window, return true if the parent
// was changed, false otherwise (error or newParent == oldParent)
virtual bool Reparent( wxWindowBase *newParent );