Avoid killing the updater twice.

This commit is contained in:
Andrzej Kapolka 2014-10-27 15:04:03 -07:00
parent 7bcc267cb5
commit 4ab90ce49c
2 changed files with 5 additions and 2 deletions

View file

@ -52,6 +52,7 @@ MetavoxelSystem::~MetavoxelSystem() {
// kill the updater before we delete our network simulation objects
_updater->thread()->quit();
_updater->thread()->wait();
_updater = NULL;
}
void MetavoxelSystem::init() {

View file

@ -27,8 +27,10 @@ MetavoxelClientManager::MetavoxelClientManager() :
}
MetavoxelClientManager::~MetavoxelClientManager() {
_updater->thread()->quit();
_updater->thread()->wait();
if (_updater) {
_updater->thread()->quit();
_updater->thread()->wait();
}
}
void MetavoxelClientManager::init() {