Don't call SP::SPTextureManager::get() if not GLSL to avoid leaking

This commit is contained in:
Benau 2018-09-30 13:00:24 +08:00
parent 05e1d629ee
commit cb9a17563e

View File

@ -23,6 +23,7 @@
#include <sstream>
#include "config/user_config.hpp"
#include "graphics/central_settings.hpp"
#include "graphics/material.hpp"
#include "graphics/particle_kind_manager.hpp"
#include "graphics/sp/sp_texture_manager.hpp"
@ -57,9 +58,10 @@ MaterialManager::MaterialManager()
MaterialManager::~MaterialManager()
{
#ifndef SERVER_ONLY
SP::SPTextureManager::get()->stopThreads();
if (CVS->isGLSL())
SP::SPTextureManager::get()->stopThreads();
#endif
for(unsigned int i=0; i<m_materials.size(); i++)
{
delete m_materials[i];