From 24b6f06015299e1cc2c20e63de47f322f5ee46d1 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Sat, 7 May 2022 08:45:43 +0800 Subject: [PATCH] App: fix crash on removing dynamic property Related FreeCAD/FreeCAD#6840 --- src/App/DocumentObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/DocumentObject.cpp b/src/App/DocumentObject.cpp index 667402b811..3d903f8bb2 100644 --- a/src/App/DocumentObject.cpp +++ b/src/App/DocumentObject.cpp @@ -693,7 +693,7 @@ void DocumentObject::setDocument(App::Document* doc) bool DocumentObject::removeDynamicProperty(const char* name) { - if (!_pDoc) + if (!_pDoc || testStatus(ObjectStatus::Destroy)) return false; Property* prop = getDynamicPropertyByName(name);