]> git.saurik.com Git - wxWidgets.git/commitdiff
do not overwrite ms_{hwnd,className} in wxTimerHiddenWindowModule::OnInit() in case...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 17 May 2009 09:58:14 +0000 (09:58 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 17 May 2009 09:58:14 +0000 (09:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/timer.cpp

index a82534c49287651a38e334038172f582e94d7f29..e5e42f4a6ac6fb9b30fa7d281dace4416a9ac0d5 100644 (file)
@@ -192,8 +192,10 @@ const wxChar *wxTimerHiddenWindowModule::ms_className = NULL;
 
 bool wxTimerHiddenWindowModule::OnInit()
 {
-    ms_hwnd = NULL;
-    ms_className = NULL;
+    // do not initialize ms_hwnd to ms_className to NULL here: it may happen
+    // that our GetHWND() is called before the modules are initialized if a
+    // timer is created from wxApp-derived class ctor and in this case we
+    // shouldn't overwrite it
 
     return true;
 }