From 9efb0a65b0137e1b92ad4223dd6457b94cd8cd50 Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Wed, 11 Apr 2007 13:05:50 +0000 Subject: [PATCH] Fixed bad dereferencing of null settings --- src/database.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)) -- 1.7.10.4