store startup path statically

svn path=/trunk/; revision=13328
This commit is contained in:
Martin Fuchs 2005-01-27 00:20:40 +00:00
parent 9e0b60cb02
commit 0fc75e8bd1

View file

@ -50,13 +50,12 @@ HWND MainFrameBase::Create(LPCTSTR path, bool mdi, UINT cmdshow)
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;
}