From 87afa9fe11b8d2e9b776552cec8938635b0acbbf Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Wed, 17 Dec 2025 03:45:08 +0200 Subject: [PATCH] Verify the last project path before using it --- Source/Editor/Editor.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/Editor/Editor.cpp b/Source/Editor/Editor.cpp index e82be1128..c08648505 100644 --- a/Source/Editor/Editor.cpp +++ b/Source/Editor/Editor.cpp @@ -536,13 +536,12 @@ int32 Editor::LoadProduct() String lastProjectPath; if (FileSystem::FileExists(lastProjectSettingPath)) File::ReadAllText(lastProjectSettingPath, lastProjectPath); + if (!FileSystem::DirectoryExists(lastProjectPath)) + lastProjectPath = String::Empty; // Try to open the last project when requested - if (projectPath.IsEmpty() && CommandLine::Options.LastProject.IsTrue()) - { - if (!lastProjectPath.IsEmpty() && FileSystem::DirectoryExists(lastProjectPath)) - projectPath = lastProjectPath; - } + if (projectPath.IsEmpty() && CommandLine::Options.LastProject.IsTrue() && !lastProjectPath.IsEmpty()) + projectPath = lastProjectPath; // Missing project case if (projectPath.IsEmpty())