From: Adam Dickmeiss Date: Tue, 3 Sep 2002 18:10:13 +0000 (+0000) Subject: Fixed crash due to absent database in NamePlusRecord X-Git-Tag: YAZ.1.9~7 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=399ff63d5fad2f5a249d6326b5a8658979897b68;p=yaz-moved-to-github.git Fixed crash due to absent database in NamePlusRecord --- diff --git a/zoom/zoom-c.c b/zoom/zoom-c.c index 522660a..1839dd2 100644 --- a/zoom/zoom-c.c +++ b/zoom/zoom-c.c @@ -1,5 +1,5 @@ /* - * $Id: zoom-c.c,v 1.42 2002-08-25 06:48:18 adam Exp $ + * $Id: zoom-c.c,v 1.43 2002-09-03 18:10:13 adam Exp $ * * ZOOM layer for C, connections, result sets, queries. */ @@ -1036,7 +1036,7 @@ ZOOM_record_get (ZOOM_record rec, const char *type, int *len) if (!strcmp (type, "database")) { if (len) - *len = strlen(npr->databaseName); + *len = (npr->databaseName ? strlen(npr->databaseName) : 0); return npr->databaseName; } else if (!strcmp (type, "syntax"))