Skip to content

Commit cf14be6

Browse files
committed
健壮化
1 parent b219c3a commit cf14be6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/com/hankcs/hanlp/seg/Segment.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ protected static List<Vertex> combineByCustomDictionary(List<Vertex> vertexList)
235235
{
236236
for (int i = 0; i < wordNet.length; ++i)
237237
{
238+
if (wordNet[i] == null) continue;
238239
BaseNode<CoreDictionary.Attribute> state = CustomDictionary.trie.transition(wordNet[i].realWord.toCharArray(), 0);
239240
if (state != null)
240241
{

0 commit comments

Comments
 (0)