diff --git a/interface/src/MetavoxelSystem.cpp b/interface/src/MetavoxelSystem.cpp index a9bdad8148..8e5ae8d9b1 100644 --- a/interface/src/MetavoxelSystem.cpp +++ b/interface/src/MetavoxelSystem.cpp @@ -48,6 +48,12 @@ MetavoxelSystem::NetworkSimulation::NetworkSimulation(float dropRate, float repe bandwidthLimit(bandwidthLimit) { } +MetavoxelSystem::~MetavoxelSystem() { + // kill the updater before we delete our network simulation objects + _updater->thread()->quit(); + _updater->thread()->wait(); +} + void MetavoxelSystem::init() { MetavoxelClientManager::init(); DefaultMetavoxelRendererImplementation::init(); diff --git a/interface/src/MetavoxelSystem.h b/interface/src/MetavoxelSystem.h index 14a24eea59..08cc1098ca 100644 --- a/interface/src/MetavoxelSystem.h +++ b/interface/src/MetavoxelSystem.h @@ -43,6 +43,8 @@ public: int maximumDelay = 0, int bandwidthLimit = 0); }; + virtual ~MetavoxelSystem(); + virtual void init(); virtual MetavoxelLOD getLOD();