Fix crash in OSX

Resizing of screen can only be done in main thread
This commit is contained in:
Benau 2020-06-16 09:59:02 +08:00
parent d1ab5f8aaf
commit 945565790c

View File

@ -127,6 +127,7 @@ World* World::m_world[PT_COUNT];
*/
World::World() : WorldStatus()
{
if (m_process_type == PT_MAIN)
GUIEngine::getDevice()->setResizable(true);
RewindManager::setEnable(NetworkConfig::get()->isNetworking());
#ifdef DEBUG
@ -602,9 +603,11 @@ Controller* World::loadAIController(AbstractKart* kart)
//-----------------------------------------------------------------------------
World::~World()
{
GUIEngine::getDevice()->setResizable(false);
if (m_process_type == PT_MAIN)
{
GUIEngine::getDevice()->setResizable(false);
material_manager->unloadAllTextures();
}
RewindManager::destroy();