diff options
Diffstat (limited to 'src/irrlichtwrapper.cpp')
-rw-r--r-- | src/irrlichtwrapper.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/irrlichtwrapper.cpp b/src/irrlichtwrapper.cpp index e5cab98c6..a1d37f4bd 100644 --- a/src/irrlichtwrapper.cpp +++ b/src/irrlichtwrapper.cpp @@ -5,6 +5,7 @@ IrrlichtWrapper::IrrlichtWrapper(IrrlichtDevice *device) { + m_running = true; m_main_thread = get_current_thread_id(); m_device_mutex.Init(); m_device = device; @@ -35,6 +36,11 @@ void IrrlichtWrapper::Run() } } +void IrrlichtWrapper::Shutdown(bool shutdown) +{ + m_running = !shutdown; +} + textureid_t IrrlichtWrapper::getTextureId(const std::string &name) { u32 id = m_namecache.getId(name); @@ -73,6 +79,10 @@ video::ITexture* IrrlichtWrapper::getTexture(const TextureSpec &spec) } else { + // If irrlicht has shut down, just return NULL + if(m_running == false) + return NULL; + // We're gonna ask the result to be put into here ResultQueue<TextureSpec, video::ITexture*, u8, u8> result_queue; |