]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/app.cpp
Fixes #10382: Memory leak in wxDataViewMainWindow::IsExpanded
[wxWidgets.git] / src / dfb / app.cpp
index 093bd63642d78c2b9eee67f8a7abcbfa863e3d6f..c95912e53866c75d74b0b69b56ac506831b9838f 100644 (file)
@@ -171,9 +171,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
         return true; // can't process events from other threads
 #endif // wxUSE_THREADS
 
-    static bool s_inYield = false;
-
-    if ( s_inYield )
+    if ( m_isInsideYield )
     {
         if ( !onlyIfNeeded )
         {
@@ -183,14 +181,14 @@ bool wxApp::Yield(bool onlyIfNeeded)
         return false;
     }
 
-    s_inYield = true;
+    m_isInsideYield = true;
 
 #if wxUSE_LOG
     wxLog::Suspend();
 #endif // wxUSE_LOG
 
     wxEventLoop * const
-        loop = wx_static_cast(wxEventLoop *, wxEventLoop::GetActive());
+        loop = static_cast<wxEventLoop *>(wxEventLoop::GetActive());
     if ( loop )
         loop->Yield();
 
@@ -203,7 +201,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
     wxLog::Resume();
 #endif // wxUSE_LOG
 
-    s_inYield = false;
+    m_isInsideYield = false;
 
     return true;
 }