Skip to content

Commit 7f55988

Browse files
committed
OpenFileDlg: Avoid creating an empty CPath object.
1 parent c92902e commit 7f55988

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mpc-hc/OpenFileDlg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ COpenFileDlg::COpenFileDlg(CAtlArray<CString>& mask, bool fAllowDirSelection, LP
4242
m_defaultDir.RemoveFileSpec();
4343

4444
m_fAllowDirSelection = fAllowDirSelection;
45-
m_pOFN->lpstrInitialDir = m_defaultDir.FileExists() ? m_defaultDir : nullptr;
45+
m_pOFN->lpstrInitialDir = m_defaultDir.FileExists() ? (LPCTSTR)m_defaultDir : nullptr;
4646

4747
m_buff = DEBUG_NEW TCHAR[10000];
4848
m_buff[0] = 0;

0 commit comments

Comments
 (0)