ecode: Fixed a crash when creating a terminal without a project opened and after closing the last editor.

This commit is contained in:
Martín Lucas Golini
2023-02-18 01:45:39 -03:00
parent 2e6216d6d4
commit be57b28737

View File

@@ -989,7 +989,7 @@ std::string App::getCurrentWorkingDir() const {
if ( !mCurrentProject.empty() )
return mCurrentProject;
if ( mSplitter && mSplitter->curEditorExists() && mSplitter->getCurEditor()->hasDocument() &&
if ( mSplitter && mSplitter->curEditorIsNotNull() && mSplitter->getCurEditor()->hasDocument() &&
mSplitter->getCurEditor()->getDocument().hasFilepath() ) {
return mSplitter->getCurEditor()->getDocument().getFileInfo().getDirectoryPath();
}