... | ... |
@@ -704,7 +704,9 @@ static int build(const struct optstruct *opts) |
704 | 704 |
} |
705 | 705 |
closedir(dd); |
706 | 706 |
entries += dblist2cnt; |
707 |
- qsort(dblist2, dblist2cnt, sizeof(char *), qcompare); |
|
707 |
+ if(dblist2 != NULL) { |
|
708 |
+ qsort(dblist2, dblist2cnt, sizeof(char *), qcompare); |
|
709 |
+ } |
|
708 | 710 |
|
709 | 711 |
if(!access("last.hdb", R_OK)) { |
710 | 712 |
if(!dblist2cnt) { |