diff options
Diffstat (limited to 'TSRM/TSRM.c')
-rw-r--r-- | TSRM/TSRM.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index ebb0acbe8f..a47cfacfad 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -157,7 +157,12 @@ TSRM_API void tsrm_shutdown(void) int j; next_p = p->next; - for (j=0; j<id_count; j++) { + for (j=0; j<p->count; j++) { + if (resource_types_table[j].dtor) { + resource_types_table[j].dtor(p->storage[j], &p->storage); + } + } + for (j=0; j<p->count; j++) { if (resource_types_table && resource_types_table[j].dtor) { resource_types_table[j].dtor(p->storage[j], &p->storage); } |