changeset 2299:92e31a1b0c2f vim73

Fix crash in generating spell .sug file.
author Bram Moolenaar <bram@vim.org>
date Sun, 11 Jul 2010 18:01:39 +0200
parents a3562a127cf6
children 486fb50528f0
files src/spell.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/spell.c
+++ b/src/spell.c
@@ -7557,7 +7557,8 @@ tree_add_word(spin, word, root, flags, r
 		np->wn_refs = node->wn_refs;
 		node->wn_refs = 1;
 	    }
-	    *prev = np;
+	    if (prev != NULL)
+		*prev = np;
 	    np->wn_sibling = node;
 	    node = np;
 	}