diff options
Diffstat (limited to 'libcrystfel/src/dirax.c')
-rw-r--r-- | libcrystfel/src/dirax.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libcrystfel/src/dirax.c b/libcrystfel/src/dirax.c index 488eb7db..512a61e1 100644 --- a/libcrystfel/src/dirax.c +++ b/libcrystfel/src/dirax.c @@ -660,9 +660,12 @@ const char *dirax_probe(UnitCell *cell) } fh = fdopen(pty, "r"); - fgets(line, 1024, fh); - if ( strncmp(line, "dirax", 5) == 0 ) { - ok = 1; + if ( fgets(line, 1024, fh) == NULL ) { + ERROR("Failed to probe for DirAx\n"); + } else { + if ( strncmp(line, "dirax", 5) == 0 ) { + ok = 1; + } } fclose(fh); |