Don't assert when destroying a never created window in wxGTK.

The other ports don't assert if a default-constructed wxWindow object for
which Create() had never been called is Destroy()d and wxGTK shouldn't do this
neither.

The new behaviour is more logical but also fixes a problem with an assert in
wxOwnerDrawnComboBox that can currently be seen in wxGTK unit tests.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-04-18 23:36:42 +00:00
parent 8d43e8c68f
commit 4af2a59fbf

View File

@@ -2460,8 +2460,6 @@ void wxWindowGTK::ConnectWidget( GtkWidget *widget )
bool wxWindowGTK::Destroy()
{
wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
m_hasVMT = false;
return wxWindowBase::Destroy();