Fix T118: simplify table cell destruction
commit455a9b234d7b65372096bcf77473564e22c32340
authorNicola Fontana <ntd@entidi.it>
Mon, 27 Apr 2020 19:51:51 +0000 (27 21:51 +0200)
committerNicola Fontana <ntd@entidi.it>
Mon, 27 Apr 2020 19:51:51 +0000 (27 21:51 +0200)
tree779fc5091fbb6364c4c33987516bbe49034886ec
parent8846c7588209ec7ad1705c251d0b64578753aaf5
Fix T118: simplify table cell destruction

When removing a cell from the hash table of AdgTable, use
g_hash_table_foreach_remove(). This is simpler and more robust (handles
multiple instances of the same cell gracefully).

The old code was conceptually right, but removing a cell without name
resulted in a call to g_hash_table_remove() with a NULL key (hence the
crash reported in the issue).
src/adg/adg-table.c