[ros-diffs] [mf] 13328: store startup path statically

mf at svn.reactos.com mf at svn.reactos.com
Thu Jan 27 01:20:41 CET 2005


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;
 		}
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050127/00fff318/attachment.html


More information about the Ros-diffs mailing list