when memory dumps out debug info, lookups can go wrong, since the list is not there anymore

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2003-09-09 15:36:22 +00:00
parent f825dcd123
commit 46d0c7072f
2 changed files with 4 additions and 0 deletions

View File

@ -421,6 +421,8 @@ DEFINE_ONE_SHOT_HANDLER_GETTER( wxMacWindowEventHandler )
wxList *wxWinMacWindowList = NULL;
wxTopLevelWindowMac *wxFindWinFromMacWindow(WXWindow inWindowRef)
{
if ( wxWinMacWindowList == NULL )
return NULL ;
wxNode *node = wxWinMacWindowList->Find((long)inWindowRef);
if (!node)
return NULL;

View File

@ -421,6 +421,8 @@ DEFINE_ONE_SHOT_HANDLER_GETTER( wxMacWindowEventHandler )
wxList *wxWinMacWindowList = NULL;
wxTopLevelWindowMac *wxFindWinFromMacWindow(WXWindow inWindowRef)
{
if ( wxWinMacWindowList == NULL )
return NULL ;
wxNode *node = wxWinMacWindowList->Find((long)inWindowRef);
if (!node)
return NULL;