From 6110a4dcdf8f269968c6a30792f47dacba3929b6 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 17 May 2013 14:44:38 +0200 Subject: [PATCH] marcmap: fix for fopen fail --- src/marcmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/marcmap.c b/src/marcmap.c index 42491e2..59cf858 100644 --- a/src/marcmap.c +++ b/src/marcmap.c @@ -54,6 +54,8 @@ struct marcmap *marcmap_load(const char *filename, NMEM nmem) mm = NULL; mmhead = NULL; fp = fopen(filename, "r"); + if (!fp) + return mmhead; while ((c = getc(fp) ) != EOF) { -- 1.7.10.4