From be57b287374faafb6d8e81cb5905d75af8a09f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sat, 18 Feb 2023 01:45:39 -0300 Subject: [PATCH] ecode: Fixed a crash when creating a terminal without a project opened and after closing the last editor. --- src/tools/ecode/ecode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/ecode/ecode.cpp b/src/tools/ecode/ecode.cpp index 1b9067b45..a3727c047 100644 --- a/src/tools/ecode/ecode.cpp +++ b/src/tools/ecode/ecode.cpp @@ -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(); }