]> git.saurik.com Git - wxWidgets.git/commitdiff
avoiding crashes on osx during app shutdown
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 7 Sep 2008 20:36:41 +0000 (20:36 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 7 Sep 2008 20:36:41 +0000 (20:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/string.h

index 1e8be0ca2371446f7bba615c3613335fc75a6b3c..393a190bbd4070e32841ef579b44fd419b21f043 100644 (file)
@@ -671,6 +671,10 @@ private:
       // profiling seems to show a small but consistent gain if we use this
       // simple loop instead of starting from the last used element (there are
       // a lot of misses in this function...)
+      // during destruction tls calls may return NULL, thus return NULL 
+      // immediately
+      if ( GetCacheBegin() == NULL )
+        return NULL;
       for ( Cache::Element *c = GetCacheBegin(); c != GetCacheEnd(); c++ )
       {
           if ( c->str == this )