don't do anything in SetBackgroundColour() if colour is invalid

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-07-26 09:24:36 +00:00
parent 3a57b93d37
commit 1f4774338e
2 changed files with 4 additions and 2 deletions

View File

@@ -1102,7 +1102,8 @@ bool wxTextCtrl::SetBackgroundColour( const wxColour &colour )
{
wxCHECK_MSG( m_text != NULL, FALSE, wxT("invalid text ctrl") );
wxControl::SetBackgroundColour( colour );
if ( !wxControl::SetBackgroundColour( colour ) )
return FALSE;
if (!m_widget->window)
return FALSE;