summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-07-11 18:01:39 +0200
committerBram Moolenaar <Bram@vim.org>2010-07-11 18:01:39 +0200
commitdc781a79b4e04e7a2973b7deaf61cb35c64683e7 (patch)
tree26b9c2598467c6e2061fdb12c866771f0144165a
parent700303e8f75ff5c67ce1bd45b3cc4de84e06c014 (diff)
downloadvim-git-dc781a79b4e04e7a2973b7deaf61cb35c64683e7.tar.gz
Fix crash in generating spell .sug file.
-rw-r--r--src/spell.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/spell.c b/src/spell.c
index b4d6ca72d..6d4d47ea2 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -7557,7 +7557,8 @@ tree_add_word(spin, word, root, flags, region, affixID)
np->wn_refs = node->wn_refs;
node->wn_refs = 1;
}
- *prev = np;
+ if (prev != NULL)
+ *prev = np;
np->wn_sibling = node;
node = np;
}