Skip to content

Commit b420d44

Browse files
authored
Release XML element when property value node was bound (#1096)
1 parent 90755f7 commit b420d44

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/math/FGPropertyValue.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,12 @@ FGPropertyValue::FGPropertyValue(const std::string& propName,
4949
Sign = -1.0;
5050
}
5151

52-
if (PropertyManager->HasNode(PropertyName))
52+
if (PropertyManager->HasNode(PropertyName)) {
5353
PropertyNode = PropertyManager->GetNode(PropertyName);
54+
55+
assert(PropertyNode);
56+
XML_def = nullptr; // Now that the property is bound, we no longer need that.
57+
}
5458
}
5559

5660
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

0 commit comments

Comments
 (0)