wolfgarbe / SymSpell

SymSpell: 1 million times faster spelling correction & fuzzy search through Symmetric Delete spelling correction algorithm
https://seekstorm.com/blog/1000x-spelling-correction/
MIT License
3.12k stars 284 forks source link

Fix for null reference exception #126

Closed kestasjk closed 2 years ago

kestasjk commented 2 years ago

If you use only CreateDictionaryEntry() with a staging object the line that initialized deletes doesn't get called, which means when you call CommitStaged() you get a null reference exception. Moved the initialization line so it will be initialized on both branches.

kestasjk commented 2 years ago

Don't know what the failed check is about, the syntax looks okay and I just moved a line of code up a few lines. :/

wolfgarbe commented 2 years ago

Thx for the fix!