[Workspaces] eliminate crash threat (#35535)

Co-authored-by: Seraphima <zykovas91@gmail.com>
This commit is contained in:
Laszlo Nemeth 2024-10-23 15:00:56 +02:00 committed by GitHub
parent c3fe541139
commit b0be69a1b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -398,6 +398,11 @@ namespace WorkspacesEditor.ViewModels
public async void LaunchProject(Project project, bool exitAfterLaunch = false) public async void LaunchProject(Project project, bool exitAfterLaunch = false)
{ {
if (project == null)
{
return;
}
await Task.Run(() => RunLauncher(project.Id, InvokePoint.EditorButton)); await Task.Run(() => RunLauncher(project.Id, InvokePoint.EditorButton));
if (_workspacesEditorIO.ParseWorkspaces(this).Result == true) if (_workspacesEditorIO.ParseWorkspaces(this).Result == true)
{ {