Browse Source

fixes a crash on the actor subpart

Asad M. Zaman 19 years ago
parent
commit
074afb48f5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      direct/src/actor/Actor.py

+ 1 - 1
direct/src/actor/Actor.py

@@ -1296,7 +1296,7 @@ class Actor(DirectObject, NodePath):
                 # get the named animation only.
                 # get the named animation only.
                 for thisPart, animDict in animDictItems:
                 for thisPart, animDict in animDictItems:
                     anim = animDict.get(animName)
                     anim = animDict.get(animName)
-                    if anim == None:
+                    if anim == None and partName != None:
                         for pName in partNameList:
                         for pName in partNameList:
                             # Maybe it's a subpart that hasn't been bound yet.
                             # Maybe it's a subpart that hasn't been bound yet.
                             subpartDef = self.__subpartDict.get(pName)
                             subpartDef = self.__subpartDict.get(pName)