Fixed unref image so it only unref's when images are STATIC

This commit is contained in:
Robert Osfield
2004-07-27 13:24:35 +00:00
parent 2e524ed9d7
commit 654764a0e9
5 changed files with 19 additions and 7 deletions

View File

@@ -188,7 +188,7 @@ void Texture2D::apply(State& state) const
getModifiedTag(contextID) = _image->getModifiedTag();
if (_unrefImageDataAfterApply && areAllTextureObjectsLoaded() && getDataVariance()==STATIC)
if (_unrefImageDataAfterApply && areAllTextureObjectsLoaded() && _image->getDataVariance()==STATIC)
{
Texture2D* non_const_this = const_cast<Texture2D*>(this);
non_const_this->_image = 0;