From 6cec876a412332b1f057dca4c0482d07dbf993e0 Mon Sep 17 00:00:00 2001 From: Florian Foinant-Willig Date: Tue, 12 Mar 2024 21:47:07 +0100 Subject: [PATCH] [Link] Fix SIGSEGV with LinkCopyOnChange=Tracking --- src/App/Link.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/App/Link.cpp b/src/App/Link.cpp index 4328a2ebe1..088143bfb5 100644 --- a/src/App/Link.cpp +++ b/src/App/Link.cpp @@ -319,6 +319,12 @@ App::DocumentObjectExecReturn *LinkBaseExtension::extensionExecute() { syncCopyOnChange(); } + // the previous linked object could be deleted by syncCopyOnChange - #12281 + linked = getTrueLinkedObject(true); + if(!linked) { + return new App::DocumentObjectExecReturn("Error in processing variable link"); + } + PropertyPythonObject *proxy = nullptr; if(getLinkExecuteProperty() && !boost::iequals(getLinkExecuteValue(), "none")