From a21b209436ed340ffca8dc3b50c7e34df9bf72d1 Mon Sep 17 00:00:00 2001 From: vsc Date: Wed, 12 Nov 2003 13:31:28 +0000 Subject: [PATCH] don't allow removeindex to remove own clause. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@923 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/dbase.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/C/dbase.c b/C/dbase.c index 5d7406f01..88ade8ac1 100644 --- a/C/dbase.c +++ b/C/dbase.c @@ -3863,7 +3863,11 @@ EraseLogUpdCl(LogUpdClause *clau) DBErasedList = clau; } #endif + /* we are holding a reference to the clause */ + clau->ClRefCount++; Yap_RemoveClauseFromIndex(clau->ClPred, clau->ClCode); + /* release the extra reference */ + clau->ClRefCount--; } complete_lu_erase(clau); }