aboutsummaryrefslogtreecommitdiff
path: root/src/partialator.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/partialator.c')
-rw-r--r--src/partialator.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/partialator.c b/src/partialator.c
index 569145e8..142ca892 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -1018,7 +1018,10 @@ int main(int argc, char *argv[])
ERROR("Failed to open '%s'\n", sparams_fn);
return 1;
}
- fgets(line, 1024, sparams_fh);
+ if ( fgets(line, 1024, sparams_fh) == NULL ) {
+ ERROR("Failed to read header from %s\n", sparams_fn);
+ return 1;
+ }
STATUS("Reading initial scaling factors (G,B) from '%s'\n",
sparams_fn);
free(sparams_fn);