Browse Source

Fixed index-out-of bounds bug.

Fixed bug #1462 in SceneSelection::GetSelectedNode().
Manuel Freiberger 8 years ago
parent
commit
455276f1fb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/AtomicEditor/Editors/SceneEditor3D/SceneSelection.cpp

+ 1 - 1
Source/AtomicEditor/Editors/SceneEditor3D/SceneSelection.cpp

@@ -66,7 +66,7 @@ SceneSelection::~SceneSelection()
 
 
 Node* SceneSelection::GetSelectedNode(unsigned index) const
 Node* SceneSelection::GetSelectedNode(unsigned index) const
 {
 {
-    if (index > nodes_.Size())
+    if (index >= nodes_.Size())
         return 0;
         return 0;
 
 
     return nodes_[index];
     return nodes_[index];