diff options
author | Thomas White <taw@physics.org> | 2011-03-09 16:39:10 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:19 +0100 |
commit | d188e3dc6083e11fbfe1957772c54c8ca2eb5e52 (patch) | |
tree | d8f762e24029f3edb167000e1713d4be4f4a1931 | |
parent | c57e0ce86d79401b73b8395431c433b7a2d56bad (diff) |
indexamajig: Fix segfault if called with no indexing method at all
-rw-r--r-- | src/indexamajig.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index 2a81766b..51461c91 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -613,7 +613,8 @@ int main(int argc, char *argv[]) return 1; } - if ( strcmp(indm_str, "none") == 0 ) { + if ( (indm_str == NULL) || + ((indm_str != NULL) && (strcmp(indm_str, "none") == 0)) ) { STATUS("Not indexing anything.\n"); indexer_needs_cell = 0; reduction_needs_cell = 0; |