diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 9b9ec27e61..ae2c62a671 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -213,7 +213,8 @@ wxWindowBase::~wxWindowBase() delete m_windowValidator; #endif // wxUSE_VALIDATORS - if ( m_clientObject ) + // we only delete object data, not untyped + if ( m_clientDataType == ClientData_Object ) delete m_clientObject; #if wxUSE_CONSTRAINTS