]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't assert when destroying a never created window in wxGTK.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 18 Apr 2011 23:36:42 +0000 (23:36 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 18 Apr 2011 23:36:42 +0000 (23:36 +0000)
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

src/gtk/window.cpp

index 39e2c7603bd4b5566aa4ade133cef4868f49c77c..4ac089ebccf61a3043752f19aefe739c5e99611c 100644 (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();