recollindex -i/e would dump core if file list was empty

This commit is contained in:
Jean-Francois Dockes 2012-10-31 07:50:17 +01:00
parent 7d9560f5c2
commit 007f0b06c1

View file

@ -395,7 +395,7 @@ int main(int argc, char **argv)
status = indexfiles(config, filenames);
else
status = purgefiles(config, filenames);
if (!confindexer->getReason().empty())
if (confindexer && !confindexer->getReason().empty())
cerr << confindexer->getReason() << endl;
exit(status ? 0 : 1);
} else if (op_flags & OPT_l) {