]> git.mxchange.org Git - simgear.git/commitdiff
Don't try to load textures when no name is given
authorfredb <fredb>
Mon, 6 Nov 2006 21:59:02 +0000 (21:59 +0000)
committerfredb <fredb>
Mon, 6 Nov 2006 21:59:02 +0000 (21:59 +0000)
simgear/scene/model/animation.cxx

index 716cc5463415c4cf06c509e350805afb6c1c0885..47bee355cd18f3214edbe2a5feb3e98c5ea6ab69 100644 (file)
@@ -1123,6 +1123,7 @@ SGMaterialAnimation::SGMaterialAnimation( SGPropertyNode *prop_root,
     if (!_texture_str.empty()) {
         _texture = _texture_base;
         _texture.append(_texture_str);
+        _texture2D = SGLoadTexture2D(_texture);
         _update |= TEXTURE;
     }
 
@@ -1136,7 +1137,6 @@ SGMaterialAnimation::SGMaterialAnimation( SGPropertyNode *prop_root,
     _static_update = _update;
 
     _alphaFunc = new osg::AlphaFunc(osg::AlphaFunc::GREATER, 0);
-    _texture2D = SGLoadTexture2D(_texture);
 }
 
 void SGMaterialAnimation::initColorGroup(SGPropertyNode_ptr group, ColorSpec *col, int flag)