From 26faef043ec1167beb55bcaa6420187c4554371c Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Tue, 20 Jul 2021 21:33:18 +0800 Subject: [PATCH] App: fix crash on LinkBaseExtension::syncElementList() Related realthunder/FreeCAD_Assembly3#744 --- src/App/Link.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App/Link.cpp b/src/App/Link.cpp index bfe7107a80ef..bb16b31244dc 100644 --- a/src/App/Link.cpp +++ b/src/App/Link.cpp @@ -1580,8 +1580,8 @@ void LinkBaseExtension::syncElementList() { { element->LinkedObject.setValue(xlink->getValue(), xlink->getSubValues()); } - } else if(element->LinkedObject.getValue()!=link->getValue() || - element->LinkedObject.getSubValues().size()) + } else if(link && (element->LinkedObject.getValue()!=link->getValue() + || element->LinkedObject.getSubValues().size())) { element->setLink(-1,link->getValue()); }