Browse Source

* [Editor] BugFix: Fix a crash that sometimes occurs when groups of objects are deleted in the world editor.

Robert MacGregor 4 years ago
parent
commit
12f4af51f5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Engine/source/gui/worldEditor/worldEditor.cpp

+ 2 - 2
Engine/source/gui/worldEditor/worldEditor.cpp

@@ -1993,12 +1993,12 @@ void WorldEditor::on3DMouseMove(const Gui3DMouseEvent & event)
    if ( !mHitObject )
    if ( !mHitObject )
    {
    {
       SceneObject *hitObj = NULL;
       SceneObject *hitObj = NULL;
-      if ( collide(event, &hitObj) && hitObj->isSelectionEnabled() && !objClassIgnored(hitObj) )
+      if ( collide(event, &hitObj) && !hitObj->isDeleted() && hitObj->isSelectionEnabled() && !objClassIgnored(hitObj) )
       {
       {
          mHitObject = hitObj;
          mHitObject = hitObj;
       }
       }
    }
    }
-   
+
    mLastMouseEvent = event;
    mLastMouseEvent = event;
 }
 }