From c2094564d7a34af2e9ae22d88dc2551da1b9f5f0 Mon Sep 17 00:00:00 2001 From: Kevin Hock Date: Mon, 22 Nov 2004 16:37:27 +0000 Subject: [PATCH] At least under GTK2, we do not need m_widget->window to be non-NULL in order to successfully change the background colour git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/textctrl.cpp | 2 ++ src/gtk1/textctrl.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 453274792e..5d4025de68 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -1483,8 +1483,10 @@ bool wxTextCtrl::SetBackgroundColour( const wxColour &colour ) if ( !wxControl::SetBackgroundColour( colour ) ) return FALSE; +#ifndef __WXGTK20__ if (!m_widget->window) return FALSE; +#endif if (!m_backgroundColour.Ok()) return FALSE; diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index 453274792e..5d4025de68 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/textctrl.cpp @@ -1483,8 +1483,10 @@ bool wxTextCtrl::SetBackgroundColour( const wxColour &colour ) if ( !wxControl::SetBackgroundColour( colour ) ) return FALSE; +#ifndef __WXGTK20__ if (!m_widget->window) return FALSE; +#endif if (!m_backgroundColour.Ok()) return FALSE;