From 4608ebe9d1ae984667cf2d20f23fbf8807064afc Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 13 Jan 2010 10:52:27 +0100 Subject: Counting and error-checking fixes --- src/indexamajig.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/indexamajig.c b/src/indexamajig.c index 7f863a65..3d5bdd27 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -126,11 +126,14 @@ int main(int argc, char *argv[]) STATUS("Processing '%s'\n", line); + n_images++; + hdfile = hdfile_open(line); if ( hdfile == NULL ) { - ERROR("Couldn't open file '%s'\n", filename); + continue; } else if ( hdfile_set_first_image(hdfile, "/") ) { ERROR("Couldn't select path\n"); + continue; } hdf5_read(hdfile, &image); @@ -158,8 +161,6 @@ int main(int argc, char *argv[]) } - n_images++; - } while ( rval != NULL ); fclose(fh); -- cgit v1.2.3