mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
store startup path statically
svn path=/trunk/; revision=13328
This commit is contained in:
parent
9e0b60cb02
commit
0fc75e8bd1
1 changed files with 1 additions and 2 deletions
|
@ -50,13 +50,12 @@ HWND MainFrameBase::Create(LPCTSTR path, bool mdi, UINT cmdshow)
|
||||||
hMainFrame = SDIMainFrame::Create();
|
hMainFrame = SDIMainFrame::Create();
|
||||||
|
|
||||||
if (hMainFrame) {
|
if (hMainFrame) {
|
||||||
String sPath;
|
|
||||||
HWND hwndOld = g_Globals._hMainWnd;
|
HWND hwndOld = g_Globals._hMainWnd;
|
||||||
|
|
||||||
g_Globals._hMainWnd = hMainFrame;
|
g_Globals._hMainWnd = hMainFrame;
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
sPath = path; // copy path to avoid accessing freed memory
|
static String sPath = path; // copy path to avoid accessing freed memory
|
||||||
path = sPath;
|
path = sPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue