diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 42c48bc397..71b63e8593 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -249,6 +249,7 @@ Application::~Application() { _audio.shutdown(); + VoxelNode::removeDeleteHook(&_voxels); // we don't need to do this processing on shutdown delete Menu::getInstance(); delete _oculusProgram; diff --git a/interface/src/ui/VoxelStatsDialog.cpp b/interface/src/ui/VoxelStatsDialog.cpp index c3f3226719..ab1371f53f 100644 --- a/interface/src/ui/VoxelStatsDialog.cpp +++ b/interface/src/ui/VoxelStatsDialog.cpp @@ -57,8 +57,12 @@ VoxelStatsDialog::VoxelStatsDialog(QWidget* parent, NodeToVoxelSceneStats* model } void VoxelStatsDialog::RemoveStatItem(int item) { - QLabel* label = _labels[item]; - delete label; + QLabel* myLabel = _labels[item]; + QWidget* automaticLabel = _form->labelForField(myLabel); + _form->removeWidget(myLabel); + _form->removeWidget(automaticLabel); + automaticLabel->deleteLater(); + myLabel->deleteLater(); _labels[item] = NULL; } @@ -194,7 +198,6 @@ void VoxelStatsDialog::paintEvent(QPaintEvent* event) { "Leaves: " << serversLeavesString.toLocal8Bit().constData() << ""; label->setText(statsValue.str().c_str()); - showAllVoxelServers(); this->QDialog::paintEvent(event);