Skip to content

Commit

Permalink
Fixed error in GNEApplicationWindow::closeAllWindows() during closing…
Browse files Browse the repository at this point in the history
… windows with one element being inspected. Refs #13894
  • Loading branch information
palvarezlopez committed Dec 19, 2023
1 parent db034de commit abe475f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/netedit/GNEApplicationWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1547,14 +1547,20 @@ GNEApplicationWindow::updateRecomputingLabel() {

void
GNEApplicationWindow::closeAllWindows() {
// first check if net must be deleted
if (myNet != nullptr) {
delete myNet;
myNet = nullptr;
GeoConvHelper::resetLoaded();
}
// check if view has to be saved
if (myViewNet) {
myViewNet->saveVisualizationSettings();
// clear decals
myViewNet->getDecals().clear();
}
// lock tracker
myTrackerLock.lock();
// clear decals
// remove trackers and other external windows
while (!myGLWindows.empty()) {
delete myGLWindows.front();
Expand All @@ -1574,12 +1580,6 @@ GNEApplicationWindow::closeAllWindows() {
myCartesianCoordinate->setText(TL("N/A"));
myTestCoordinate->setText(TL("N/A"));
myTestFrame->hide();
// check if net can be deleted
if (myNet != nullptr) {
delete myNet;
myNet = nullptr;
GeoConvHelper::resetLoaded();
}
myMessageWindow->unregisterMsgHandlers();
// Reset textures
GUITextureSubSys::resetTextures();
Expand Down

0 comments on commit abe475f

Please sign in to comment.