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 | 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 | 423 | void Menu::loadSettings(QSettings* settings) { |
| 417 | 424 | if (!settings) { |
| 418 | 425 | settings = Application::getInstance()->getSettings(); |
| @@ -855,8 +862,10 @@ void Menu::bandwidthDetails() { · 436 unmodified lines | ||
| 855 | 862 | } |
| 856 | 863 | |
| 857 | 864 | void Menu::bandwidthDetailsClosed() { |
| 858 | − delete _bandwidthDialog; | |
| 859 | − _bandwidthDialog = NULL; | |
| 865 | + if (_bandwidthDialog) { | |
| 866 | + delete _bandwidthDialog; | |
| 867 | + _bandwidthDialog = NULL; | |
| 868 | + } | |
| 860 | 869 | } |
| 861 | 870 | |
| 862 | 871 | void Menu::voxelStatsDetails() { |
| @@ -870,8 +879,10 @@ void Menu::voxelStatsDetails() { · 7 unmodified lines | ||
| 870 | 879 | } |
| 871 | 880 | |
| 872 | 881 | void Menu::voxelStatsDetailsClosed() { |
| 873 | − delete _voxelStatsDialog; | |
| 874 | − _voxelStatsDialog = NULL; | |
| 882 | + if (_voxelStatsDialog) { | |
| 883 | + delete _voxelStatsDialog; | |
| 884 | + _voxelStatsDialog = NULL; | |
| 885 | + } | |
| 875 | 886 | } |
| 876 | 887 | |
| 877 | 888 | void Menu::cycleFrustumRenderMode() { |