From b0be69a1b73b5a9b78016acb1d057500c588364f Mon Sep 17 00:00:00 2001 From: Laszlo Nemeth <57342539+donlaci@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:00:56 +0200 Subject: [PATCH] [Workspaces] eliminate crash threat (#35535) Co-authored-by: Seraphima --- .../Workspaces/WorkspacesEditor/ViewModels/MainViewModel.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/Workspaces/WorkspacesEditor/ViewModels/MainViewModel.cs b/src/modules/Workspaces/WorkspacesEditor/ViewModels/MainViewModel.cs index 3f57532818..aae85161cb 100644 --- a/src/modules/Workspaces/WorkspacesEditor/ViewModels/MainViewModel.cs +++ b/src/modules/Workspaces/WorkspacesEditor/ViewModels/MainViewModel.cs @@ -398,6 +398,11 @@ namespace WorkspacesEditor.ViewModels public async void LaunchProject(Project project, bool exitAfterLaunch = false) { + if (project == null) + { + return; + } + await Task.Run(() => RunLauncher(project.Id, InvokePoint.EditorButton)); if (_workspacesEditorIO.ParseWorkspaces(this).Result == true) {