Fix crash on find references in visject surface after grid snap has been added
This commit is contained in:
@@ -132,7 +132,7 @@ namespace FlaxEditor.Surface
|
|||||||
public virtual void OnSurfaceLoaded(SurfaceNodeActions action)
|
public virtual void OnSurfaceLoaded(SurfaceNodeActions action)
|
||||||
{
|
{
|
||||||
// Snap bounds (with ceil) when using grid snapping
|
// Snap bounds (with ceil) when using grid snapping
|
||||||
if (Surface.GridSnappingEnabled)
|
if (Surface != null && Surface.GridSnappingEnabled)
|
||||||
{
|
{
|
||||||
var bounds = Bounds;
|
var bounds = Bounds;
|
||||||
bounds.Location = Surface.SnapToGrid(bounds.Location, false);
|
bounds.Location = Surface.SnapToGrid(bounds.Location, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user