From: Francesco Montorsi <f18m_cpp217828@yahoo.it>
Date: Wed, 18 Feb 2009 10:32:21 +0000 (+0000)
Subject: fix wxGTK1 build
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d270fef3e86db12738c833b1e315ff9b6d4d1d17

fix wxGTK1 build

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp
index 7fc484906b..0d410a73d8 100644
--- a/src/gtk1/textctrl.cpp
+++ b/src/gtk1/textctrl.cpp
@@ -24,6 +24,7 @@
 
 #include "wx/strconv.h"
 #include "wx/fontutil.h"        // for wxNativeFontInfo (GetNativeFontInfo())
+#include "wx/evtloop.h"
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -185,7 +186,8 @@ static GtkDrawCallback gs_gtk_text_draw = NULL;
 extern "C" {
 static void wxgtk_text_draw( GtkWidget *widget, GdkRectangle *rect)
 {
-    if ( !wxTheApp->IsYielding() )
+    wxEventLoopBase* loop = wxEventLoopBase::GetActive();
+    if ( loop && loop->IsYielding() )
     {
         wxCHECK_RET( gs_gtk_text_draw != wxgtk_text_draw,
                      _T("infinite recursion in wxgtk_text_draw aborted") );