diff --git a/main/lib/db/c_subcollection.c b/main/lib/db/c_subcollection.c index 417d93063..8fb99e6a1 100644 --- a/main/lib/db/c_subcollection.c +++ b/main/lib/db/c_subcollection.c @@ -73,11 +73,15 @@ static CSUBCOLLECTION *_current = NULL; static void clear_one(void *data) { + CSUBCOLLECTION *save = _current; + if (_current->desc->release) (*_current->desc->release)(_current->container, data); //fprintf(stderr, "clear: %p\n", data); GB.Unref(&data); + + _current = save; } static void clear_subcollection(CSUBCOLLECTION *_object)