From 5317d25254ba59eb8db40f47312ae9759645f2d8 Mon Sep 17 00:00:00 2001 From: xtemp09 Date: Sat, 25 Jan 2025 20:07:31 +0700 Subject: [PATCH] Assembly: Fix the crash described in #18475 --- src/Gui/CommandDoc.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Gui/CommandDoc.cpp b/src/Gui/CommandDoc.cpp index 83f0d413de..ed3dd7339d 100644 --- a/src/Gui/CommandDoc.cpp +++ b/src/Gui/CommandDoc.cpp @@ -1385,6 +1385,11 @@ void StdCmdDelete::activated(int iMsg) bool autoDeletion = true; for(auto &sel : sels) { auto obj = sel.getObject(); + if (obj == nullptr){ + Base::Console().DeveloperWarning("StdCmdDelete::activated", + "App::DocumentObject pointer is nullptr\n"); + continue; + } for(auto parent : obj->getInList()) { if(!Selection().isSelected(parent)) { ViewProvider* vp = Application::Instance->getViewProvider(parent);