Fix crash on Editor closing

This commit is contained in:
Wojciech Figat
2022-03-25 15:36:47 +01:00
parent 3e9b6caa1c
commit 5a0d8f44ff

View File

@@ -313,7 +313,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// Gets the control DPI scale factor (1 is default). Includes custom DPI scale.
/// </summary>
public float DpiScale => RootWindow?.Window.DpiScale ?? Platform.DpiScale;
public float DpiScale => RootWindow?.Window?.DpiScale ?? Platform.DpiScale;
/// <summary>
/// Gets screen position of the control (upper left corner).