Showing the changes to interface/src/Menu.cpp (1 of 43 files). Show all
Unified · Split
| @@ -427,6 +427,11 @@ Menu::Menu() : · 426 unmodified lines | ||
| 427 | 427 | addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::DestructiveAddVoxel); |
| 428 | 428 | } |
| 429 | 429 | |
| 430 | +Menu::~Menu() { | |
| 431 | + bandwidthDetailsClosed(); | |
| 432 | + voxelStatsDetailsClosed(); | |
| 433 | +} | |
| 434 | + | |
| 430 | 435 | void Menu::loadSettings(QSettings* settings) { |
| 431 | 436 | if (!settings) { |
| 432 | 437 | settings = Application::getInstance()->getSettings(); |
| @@ -869,8 +874,10 @@ void Menu::bandwidthDetails() { · 436 unmodified lines | ||
| 869 | 874 | } |
| 870 | 875 | |
| 871 | 876 | void Menu::bandwidthDetailsClosed() { |
| 872 | − delete _bandwidthDialog; | |
| 873 | − _bandwidthDialog = NULL; | |
| 877 | + if (_bandwidthDialog) { | |
| 878 | + delete _bandwidthDialog; | |
| 879 | + _bandwidthDialog = NULL; | |
| 880 | + } | |
| 874 | 881 | } |
| 875 | 882 | |
| 876 | 883 | void Menu::voxelStatsDetails() { |
| @@ -884,8 +891,10 @@ void Menu::voxelStatsDetails() { · 7 unmodified lines | ||
| 884 | 891 | } |
| 885 | 892 | |
| 886 | 893 | void Menu::voxelStatsDetailsClosed() { |
| 887 | − delete _voxelStatsDialog; | |
| 888 | − _voxelStatsDialog = NULL; | |
| 894 | + if (_voxelStatsDialog) { | |
| 895 | + delete _voxelStatsDialog; | |
| 896 | + _voxelStatsDialog = NULL; | |
| 897 | + } | |
| 889 | 898 | } |
| 890 | 899 | |
| 891 | 900 | void Menu::cycleFrustumRenderMode() { |