History

Merge branch 'master' of https://github.com/worklist/hifi into shifty

Andrzej Kapolka committed 13 years ago

Commit 834b6712 parents 0a9db6a fa53e5d43 files · +356 −388Browse files

Showing the changes to interface/src/Menu.cpp (1 of 43 files). Show all

Unified · Split

interface/src/Menu.cpp+13−4
@@ -427,6 +427,11 @@ Menu::Menu() : · 426 unmodified lines
427427 addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::DestructiveAddVoxel);
428428 }
429429
430+Menu::~Menu() {
431+ bandwidthDetailsClosed();
432+ voxelStatsDetailsClosed();
433+}
434+
430435 void Menu::loadSettings(QSettings* settings) {
431436 if (!settings) {
432437 settings = Application::getInstance()->getSettings();
@@ -869,8 +874,10 @@ void Menu::bandwidthDetails() { · 436 unmodified lines
869874 }
870875
871876 void Menu::bandwidthDetailsClosed() {
872− delete _bandwidthDialog;
873− _bandwidthDialog = NULL;
877+ if (_bandwidthDialog) {
878+ delete _bandwidthDialog;
879+ _bandwidthDialog = NULL;
880+ }
874881 }
875882
876883 void Menu::voxelStatsDetails() {
@@ -884,8 +891,10 @@ void Menu::voxelStatsDetails() { · 7 unmodified lines
884891 }
885892
886893 void Menu::voxelStatsDetailsClosed() {
887− delete _voxelStatsDialog;
888− _voxelStatsDialog = NULL;
894+ if (_voxelStatsDialog) {
895+ delete _voxelStatsDialog;
896+ _voxelStatsDialog = NULL;
897+ }
889898 }
890899
891900 void Menu::cycleFrustumRenderMode() {