]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
Moved allocation of m_imData or key down gives seg fault
[wxWidgets.git] / src / common / filefn.cpp
index 9250d85d90faa77a2d370ff61e864088d80cc42d..18620e0a5cbcb8c89561663b51141b0afd55d498 100644 (file)
@@ -183,14 +183,14 @@ void wxPathList::AddEnvList (const wxString& envVariable)
         path such as "C:\Program Files" would be split into 2 paths:
         "C:\Program" and "Files"
         */
-//        wxT(" ;"); // Don't seperate with colon in DOS (used for drive)
-        wxT(";"); // Don't seperate with colon in DOS (used for drive)
+//        wxT(" ;"); // Don't separate with colon in DOS (used for drive)
+        wxT(";"); // Don't separate with colon in DOS (used for drive)
 #else
         wxT(" :;");
 #endif
 
-    wxChar *val = wxGetenv (WXSTRINGCAST envVariable);
-    if (val && *val)
+    wxString val ;    
+    if (wxGetEnv (WXSTRINGCAST envVariable, &val))
     {
         wxChar *s = MYcopystring (val);
         wxChar *save_ptr, *token = wxStrtok (s, PATH_TOKS, &save_ptr);