Browse Source

Merge pull request #1463 from ombre5733/master

Fixed index out-of-bounds bug.
JoshEngebretson 8 years ago
parent
commit
8f2651a87c
2 changed files with 3 additions and 1 deletions
  1. 2 0
      AUTHORS.md
  2. 1 1
      Source/AtomicEditor/Editors/SceneEditor3D/SceneSelection.cpp

+ 2 - 0
AUTHORS.md

@@ -51,6 +51,8 @@
 
 - Borislav Parvanov (https://github.com/bparvanov)
 
+- Manuel Freiberger (https://github.com/ombre5733)
+
 ### Contribution Copyright and Licensing
 
 Atomic Game Engine contribution copyrights are held by their authors.  Each author retains the copyright to their contribution and agrees to irrevocably license the contribution under the Atomic Game Engine Contribution License `CONTRIBUTION_LICENSE.md`.  Please see `CONTRIBUTING.md` for more details.

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

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