diff --git a/Source/Editor/Windows/GameWindow.cs b/Source/Editor/Windows/GameWindow.cs
index d351147cb..4032e0aff 100644
--- a/Source/Editor/Windows/GameWindow.cs
+++ b/Source/Editor/Windows/GameWindow.cs
@@ -672,9 +672,10 @@ namespace FlaxEditor.Windows
IsBorderless = false;
Cursor = CursorType.Default;
Screen.CursorLock = CursorLockMode.None;
- if (Screen.MainWindow.IsMouseTracking)
- Screen.MainWindow.EndTrackingMouse();
- RootControl.GameRoot.EndMouseCapture();
+ var mainWindow = Screen.MainWindow;
+ if (mainWindow != null && mainWindow.IsMouseTracking)
+ mainWindow.EndTrackingMouse();
+ RootControl.GameRoot?.EndMouseCapture();
}
///
diff --git a/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs b/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs
index ffc95e047..e99b5b328 100644
--- a/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs
+++ b/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs
@@ -330,9 +330,7 @@ namespace Flax.Build.Projects.VisualStudio
foreach (var analyzer in configuration.TargetBuildOptions.ScriptingAPI.Analyzers)
{
csProjectFileContent.AppendLine(string.Format(" ", configuration.Name));
- csProjectFileContent.AppendLine(string.Format(" ", Path.GetFileNameWithoutExtension(analyzer)));
- csProjectFileContent.AppendLine(string.Format(" {0}", Utilities.MakePathRelativeTo(analyzer, projectDirectory).Replace('/', '\\')));
- csProjectFileContent.AppendLine(" ");
+ csProjectFileContent.AppendLine(string.Format(" ", Utilities.MakePathRelativeTo(analyzer, projectDirectory).Replace('/', '\\')));
csProjectFileContent.AppendLine(" ");
}