Skip to content

Commit

Permalink
Release XML element when property value node was bound (#1096)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbirkhold authored Jun 7, 2024
1 parent 90755f7 commit b420d44
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/math/FGPropertyValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ FGPropertyValue::FGPropertyValue(const std::string& propName,
Sign = -1.0;
}

if (PropertyManager->HasNode(PropertyName))
if (PropertyManager->HasNode(PropertyName)) {
PropertyNode = PropertyManager->GetNode(PropertyName);

assert(PropertyNode);
XML_def = nullptr; // Now that the property is bound, we no longer need that.
}
}

//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down

0 comments on commit b420d44

Please sign in to comment.