Fixed NPE in model variant handling.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@64 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Andrzej Kapolka
2006-10-24 20:59:25 +00:00
parent 3f2885496e
commit e1c864ff46
+5 -3
View File
@@ -740,9 +740,11 @@ public class Model extends ModelNode
}
// create an instance and rebind all animations
final Model prototype = createInstance();
for (Map.Entry<String, Animation> entry : _anims.entrySet()) {
prototype._anims.put(entry.getKey(),
entry.getValue().rebind(prototype._pnodes));
if (_anims != null) {
for (Map.Entry<String, Animation> entry : _anims.entrySet()) {
prototype._anims.put(entry.getKey(),
entry.getValue().rebind(prototype._pnodes));
}
}
prototype._prototype = null;
prototype._pnodes = null;