From a369940cde2273cf50866fc097eb2a7014428aa2 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Wed, 24 Jul 2002 00:20:09 +0000
Subject: [PATCH] All iniRead functions return default value if passed a NULL
 FILE pointer.

---
 src/xpdev/ini_file.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/xpdev/ini_file.c b/src/xpdev/ini_file.c
index af1dc06bba..e8324ddf19 100644
--- a/src/xpdev/ini_file.c
+++ b/src/xpdev/ini_file.c
@@ -89,6 +89,9 @@ static char* get_value(FILE* fp, const char* section, const char* key)
 	char	str[MAX_LINE_LEN];
 	static char value[MAX_VALUE_LEN];
 
+	if(fp==NULL)
+		return(NULL);
+
 	if(!find_section(fp,section))
 		return(NULL);
 
-- 
GitLab