From 5a0d8f44ffa92386512ff9fcc03972ed470b18fd Mon Sep 17 00:00:00 2001 From: Wojciech Figat Date: Fri, 25 Mar 2022 15:36:47 +0100 Subject: [PATCH] Fix crash on Editor closing --- Source/Engine/UI/GUI/Control.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/UI/GUI/Control.cs b/Source/Engine/UI/GUI/Control.cs index 0031e07bd..8cd9c932b 100644 --- a/Source/Engine/UI/GUI/Control.cs +++ b/Source/Engine/UI/GUI/Control.cs @@ -313,7 +313,7 @@ namespace FlaxEngine.GUI /// /// Gets the control DPI scale factor (1 is default). Includes custom DPI scale. /// - public float DpiScale => RootWindow?.Window.DpiScale ?? Platform.DpiScale; + public float DpiScale => RootWindow?.Window?.DpiScale ?? Platform.DpiScale; /// /// Gets screen position of the control (upper left corner).