Showing the changes to interface/src/Menu.cpp (1 of 23 files). Show all
Unified · Split
| @@ -413,6 +413,13 @@ Menu::Menu() : · 412 unmodified lines | |||
| 413 | addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::DestructiveAddVoxel); | 413 | addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::DestructiveAddVoxel); |
| 414 | } | 414 | } |
| 415 | 415 | ||
| 416 | Menu::~Menu() { | ||
| 417 | qDebug("[DEBUG] Menu destructor.\n]"); | ||
| 418 | bandwidthDetailsClosed(); | ||
| 419 | voxelStatsDetailsClosed(); | ||
| 420 | delete _voxelModeActionsGroup; | ||
| 421 | } | ||
| 422 | |||
| 416 | void Menu::loadSettings(QSettings* settings) { | 423 | void Menu::loadSettings(QSettings* settings) { |
| 417 | if (!settings) { | 424 | if (!settings) { |
| 418 | settings = Application::getInstance()->getSettings(); | 425 | settings = Application::getInstance()->getSettings(); |
| @@ -855,8 +862,10 @@ void Menu::bandwidthDetails() { · 436 unmodified lines | |||
| 855 | } | 862 | } |
| 856 | 863 | ||
| 857 | void Menu::bandwidthDetailsClosed() { | 864 | void Menu::bandwidthDetailsClosed() { |
| 858 | delete _bandwidthDialog; | 865 | if (_bandwidthDialog) { |
| 859 | _bandwidthDialog = NULL; | 866 | delete _bandwidthDialog; |
| 867 | _bandwidthDialog = NULL; | ||
| 868 | } | ||
| 860 | } | 869 | } |
| 861 | 870 | ||
| 862 | void Menu::voxelStatsDetails() { | 871 | void Menu::voxelStatsDetails() { |
| @@ -870,8 +879,10 @@ void Menu::voxelStatsDetails() { · 7 unmodified lines | |||
| 870 | } | 879 | } |
| 871 | 880 | ||
| 872 | void Menu::voxelStatsDetailsClosed() { | 881 | void Menu::voxelStatsDetailsClosed() { |
| 873 | delete _voxelStatsDialog; | 882 | if (_voxelStatsDialog) { |
| 874 | _voxelStatsDialog = NULL; | 883 | delete _voxelStatsDialog; |
| 884 | _voxelStatsDialog = NULL; | ||
| 885 | } | ||
| 875 | } | 886 | } |
| 876 | 887 | ||
| 877 | void Menu::cycleFrustumRenderMode() { | 888 | void Menu::cycleFrustumRenderMode() { |