From: Sebastian Hammer Date: Wed, 11 Apr 2007 13:05:50 +0000 (+0000) Subject: Fixed bad dereferencing of null settings X-Git-Tag: PAZPAR2.1.0.0~325 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=9efb0a65b0137e1b92ad4223dd6457b94cd8cd50;p=pazpar2-moved-to-github.git Fixed bad dereferencing of null settings --- diff --git a/src/database.c b/src/database.c index 61131a5..82830a8 100644 --- a/src/database.c +++ b/src/database.c @@ -1,4 +1,4 @@ -/* $Id: database.c,v 1.11 2007-04-11 11:13:46 marc Exp $ +/* $Id: database.c,v 1.12 2007-04-11 13:05:50 quinn Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -241,8 +241,7 @@ static int match_criterion(struct setting **settings, struct database_criterion int database_match_criteria(struct setting **settings, struct database_criterion *cl) { - assert(settings); - if (settings[PZ_ALLOW] && *settings[PZ_ALLOW]->value == '0') + if (settings && settings[PZ_ALLOW] && *settings[PZ_ALLOW]->value == '0') return 0; for (; cl; cl = cl->next) if (!match_criterion(settings, cl))