leonsal 8 лет назад
Родитель
Сommit
7ff88f9094
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      loader/collada/animation.go

+ 4 - 0
loader/collada/animation.go

@@ -101,6 +101,10 @@ func (at *AnimationTarget) Update(delta float32) bool {
 // The map is indexed by the node loaderID.
 func (d *Decoder) NewAnimationTargets(scene core.INode) (map[string]*AnimationTarget, error) {
 
+	if d.dom.LibraryAnimations == nil {
+		return nil, fmt.Errorf("No animations found")
+	}
+
 	// Maps target node to its animation target instance
 	targetsMap := make(map[string]*AnimationTarget)