Fix a texture manager crash