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 // kill the updater before we delete our network simulation objects
_updater->thread()->quit(); _updater->thread()->quit();
_updater->thread()->wait(); _updater->thread()->wait();
_updater = NULL;
} }
void MetavoxelSystem::init() { void MetavoxelSystem::init() {

View file

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