From Guillaume Millet, "Please find a small fix to avoid crash of texture Atlas builder in case of textures with NULL image.

If an object is comming with texture and NULL image, the texture atlas builder crash when sorting textures according to texture height.
The fix is to skip textures with NULL image when inserting textures in the builder texture list.
"
This commit is contained in:
Robert Osfield
2012-03-06 10:35:57 +00:00
parent ecbe4b1058
commit 17ba6f0a24

View File

@@ -4409,7 +4409,7 @@ void Optimizer::TextureAtlasVisitor::optimize()
bool t_repeat = texture->getWrap(osg::Texture2D::WRAP_T)==osg::Texture2D::REPEAT ||
texture->getWrap(osg::Texture2D::WRAP_T)==osg::Texture2D::MIRROR;
if (!s_repeat && !t_repeat)
if (texture->getImage() && !s_repeat && !t_repeat)
{
_builder.addSource(*titr);
}