From 829c729ee9ebafa7dcb7d12ded1fd5ed8f960d94 Mon Sep 17 00:00:00 2001 From: fredb Date: Mon, 6 Nov 2006 21:59:02 +0000 Subject: [PATCH] Don't try to load textures when no name is given --- simgear/scene/model/animation.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/scene/model/animation.cxx b/simgear/scene/model/animation.cxx index 716cc546..47bee355 100644 --- a/simgear/scene/model/animation.cxx +++ b/simgear/scene/model/animation.cxx @@ -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) -- 2.39.5