fix(assembly): guard onChanged against solver during document restore
Some checks failed
Build and Test / build (pull_request) Has been cancelled

During document restore, PropertyLinkList::Restore sets the Group property
on AssemblyObject, triggering onChanged → updateSolveStatus → solve →
validateNewPlacements. At this point joints reference objects that haven't
been restored yet, causing a null pointer dereference (SIGSEGV).

Add an isRestoring() guard to skip solver invocation during restore,
matching the existing pattern in AssemblyLink::onChanged().
This commit is contained in:
forbes
2026-02-15 18:45:00 -06:00
parent d497471ed3
commit 2fa1672edf

View File

@@ -139,6 +139,11 @@ App::DocumentObjectExecReturn* AssemblyObject::execute()
void AssemblyObject::onChanged(const App::Property* prop) void AssemblyObject::onChanged(const App::Property* prop)
{ {
if (App::GetApplication().isRestoring()) {
App::Part::onChanged(prop);
return;
}
if (prop == &Group) { if (prop == &Group) {
updateSolveStatus(); updateSolveStatus();
} }