store startup path statically
Modified: trunk/reactos/subsys/system/explorer/shell/mainframe.cpp
_____
Modified: trunk/reactos/subsys/system/explorer/shell/mainframe.cpp
--- trunk/reactos/subsys/system/explorer/shell/mainframe.cpp
2005-01-27 00:18:30 UTC (rev 13327)
+++ trunk/reactos/subsys/system/explorer/shell/mainframe.cpp
2005-01-27 00:20:40 UTC (rev 13328)
@@ -50,13 +50,12 @@
hMainFrame = SDIMainFrame::Create();
if (hMainFrame) {
- String sPath;
HWND hwndOld = g_Globals._hMainWnd;
g_Globals._hMainWnd = hMainFrame;
if (path) {
- sPath = path; // copy path to avoid accessing
freed memory
+ static String sPath = path; // copy path to
avoid accessing freed memory
path = sPath;
}
Show replies by date