Return error (0) rather than exit for bad dict header (magic)
[idzebra-moved-to-github.git] / dict / close.c
index fe3f192..be53165 100644 (file)
@@ -1,6 +1,6 @@
-/* $Id: close.c,v 1.8 2004-12-08 12:23:08 adam Exp $
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
-   Index Data Aps
+/* $Id: close.c,v 1.10 2006-03-26 14:02:49 adam Exp $
+   Copyright (C) 1995-2005
+   Index Data ApS
 
 This file is part of the Zebra server.
 
@@ -31,7 +31,8 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 int dict_close (Dict dict)
 {
-    assert (dict);
+    if (!dict)
+       return 0;
 
     if (dict->rw)
     {