verify path parameter to options loading

This commit is contained in:
Vincent Sanders 2012-10-05 14:26:25 +01:00
parent 49d2ce585c
commit 2bde4a3baa
1 changed files with 5 additions and 0 deletions

View File

@ -133,6 +133,11 @@ void nsoption_read(const char *path)
char s[100];
FILE *fp;
if (path == NULL) {
LOG(("No options loaded"));
return;
}
fp = fopen(path, "r");
if (!fp) {
LOG(("failed to open file '%s'", path));