From 0ce3cc69fbf3ab24bade280354dee87e62b6e694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sat, 7 Dec 2013 12:49:11 +0000 Subject: [PATCH] [GB.DB] * BUG: Don't crash anymore when releasing database objects. git-svn-id: svn://localhost/gambas/trunk@5987 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- main/lib/db/c_subcollection.c | 4 ++++ 1 file changed, 4 insertions(+) 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)