Don't reset computed properties if already empty (#7188)

This commit is contained in:
Rachel Walker
2024-02-23 21:47:44 -08:00
committed by GitHub
parent 0c445f41e9
commit 4fa6c65685

View File

@@ -148,7 +148,7 @@ class RDProps {
//! clears all of our \c computed \c properties
void clearComputedProps() const {
STR_VECT compLst;
if (getPropIfPresent(RDKit::detail::computedPropName, compLst)) {
if (getPropIfPresent(RDKit::detail::computedPropName, compLst) && !compLst.empty()) {
for (const auto &sv : compLst) {
d_props.clearVal(sv);
}