diff --git a/jive_core/geometry/jive_BoxModel.cpp b/jive_core/geometry/jive_BoxModel.cpp index 3e957c10..915ee790 100644 --- a/jive_core/geometry/jive_BoxModel.cpp +++ b/jive_core/geometry/jive_BoxModel.cpp @@ -195,13 +195,13 @@ namespace jive void BoxModel::invalidateParent() { - if (!state.getParent().isValid()) - return; - - BoxModel parent{ state.getParent() }; - - parent.isValid = true; - parent.isValid = false; + if (auto parent = state.getParent(); + parent.isValid()) + { + Property parentIsValid{ parent, isValid.id }; + parentIsValid = true; + parentIsValid = false; + } } BoxModel::ScopedCallbackLock::ScopedCallbackLock(BoxModel& boxModelToLock)