aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-03-09 16:39:10 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:19 +0100
commitd188e3dc6083e11fbfe1957772c54c8ca2eb5e52 (patch)
treed8f762e24029f3edb167000e1713d4be4f4a1931 /src
parentc57e0ce86d79401b73b8395431c433b7a2d56bad (diff)
indexamajig: Fix segfault if called with no indexing method at all
Diffstat (limited to 'src')
-rw-r--r--src/indexamajig.c3
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;