From 19817e4ad61d2828c8da05b253df536caa210b3c Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 25 Sep 2024 20:26:28 +0200 Subject: [PATCH] Fix crash on find references in visject surface after grid snap has been added --- Source/Editor/Surface/SurfaceControl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Editor/Surface/SurfaceControl.cs b/Source/Editor/Surface/SurfaceControl.cs index 29d7c1768..5b39c6dae 100644 --- a/Source/Editor/Surface/SurfaceControl.cs +++ b/Source/Editor/Surface/SurfaceControl.cs @@ -132,7 +132,7 @@ namespace FlaxEditor.Surface public virtual void OnSurfaceLoaded(SurfaceNodeActions action) { // Snap bounds (with ceil) when using grid snapping - if (Surface.GridSnappingEnabled) + if (Surface != null && Surface.GridSnappingEnabled) { var bounds = Bounds; bounds.Location = Surface.SnapToGrid(bounds.Location, false);