From 36573bf817750db9ed40a429772ce39f83e4e1c2 Mon Sep 17 00:00:00 2001 From: captain0xff Date: Wed, 15 Oct 2025 02:50:55 +0530 Subject: [PATCH] Gui: fix null handling logic in Application::setEditDocument --- src/Gui/Application.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 47702e2949..8bc512c080 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -1371,11 +1371,10 @@ Gui::MDIView* Application::editViewOfNode(SoNode* node) const void Application::setEditDocument(Gui::Document* doc) { - if (doc == d->editDocument) { - return; - } if (!doc) { d->editDocument = nullptr; + } else if (doc == d->editDocument) { + return; } for (auto& v : d->documents) { v.second->_resetEdit();