changeset 6691:ee9c8e0f25b7 HEAD

Don't crash if index has no keywords at all.
author Timo Sirainen <tss@iki.fi>
date Mon, 05 Nov 2007 19:25:14 +0200
parents 040cbd9c4695
children a3079c4320c6
files src/util/idxview.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/util/idxview.c	Sun Nov 04 15:14:12 2007 +0200
+++ b/src/util/idxview.c	Mon Nov 05 19:25:14 2007 +0200
@@ -128,6 +128,8 @@
 	unsigned int i, count;
 
 	printf("-- Keywords --\n");
+	if (!array_is_created(&index->map->keyword_idx_map))
+		return;
 
 	kw_indexes = array_get(&index->map->keyword_idx_map, &count);
 	if (count == 0)