Browse Source

if actor already prepended to nothing

dmuratshin 9 years ago
parent
commit
9eb10c3c61
1 changed files with 2 additions and 0 deletions
  1. 2 0
      oxygine/src/Actor.cpp

+ 2 - 0
oxygine/src/Actor.cpp

@@ -926,6 +926,8 @@ namespace oxygine
 
     void Actor::prependChild(Actor* actor)
     {
+        if (actor == getFirstChild().get())
+            return;
         if (getFirstChild())
             getFirstChild()->insertSiblingBefore(actor);
         else