Skip to content

Commit

Permalink
fixup! delete ns_vec members in reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Aug 27, 2024
1 parent dd8617c commit f25aa84
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libgnucash/engine/gnc-commodity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2198,8 +2198,11 @@ gnc_commodity_table_destroy(gnc_commodity_table * t)
if (!t) return;
ENTER ("table=%p", t);

for (auto ns : t->ns_vec)
for (auto it = t->ns_vec.rbegin(); it != t->ns_vec.rend(); ++it)
{
auto ns{*it};
gnc_commodity_table_delete_namespace(t, ns->name);
}

t->ns_vec.~CommNSVec ();
t->ns_table.~StringCommNSMap ();
Expand Down

0 comments on commit f25aa84

Please sign in to comment.