]> git.saurik.com Git - wxWidgets.git/commitdiff
don't do anything in SetBackgroundColour() if colour is invalid
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 26 Jul 2001 09:24:36 +0000 (09:24 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 26 Jul 2001 09:24:36 +0000 (09:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/textctrl.cpp
src/gtk1/textctrl.cpp

index 7f5f223d94f89f66e7ec284cea24e3e57bb2df50..57de39f9ff46a99a0c30784d4fdb0ad5a101ed0c 100644 (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;
index 7f5f223d94f89f66e7ec284cea24e3e57bb2df50..57de39f9ff46a99a0c30784d4fdb0ad5a101ed0c 100644 (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;