Commit 07e26347 authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

Fixed crash in open file dialog on non-windows 98 emulation when

lpszInitialDir is null.
parent 99b33074
......@@ -1124,7 +1124,14 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
if (result) {
strcpy(fodInfos->ofnInfos->lpstrFile, nameBit);
*nameBit = 0x00;
strcpy((LPSTR) fodInfos->ofnInfos->lpstrInitialDir, tmpBuf);
if (fodInfos->ofnInfos->lpstrInitialDir == NULL) {
initDir = MemAlloc(strlen(tmpBuf) + 1);
fodInfos->ofnInfos->lpstrInitialDir = initDir;
strcpy(initDir, tmpBuf);
handledPath = TRUE;
} else {
strcpy((LPSTR)fodInfos->ofnInfos->lpstrInitialDir, tmpBuf);
}
handledPath = TRUE;
TRACE("Value in lpstrFile includes path, overriding lpstrInitialDir: %s, %s\n",
fodInfos->ofnInfos->lpstrFile, fodInfos->ofnInfos->lpstrInitialDir);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment