chokkan / crfsuite

CRFsuite: a fast implementation of Conditional Random Fields (CRFs)
http://www.chokkan.org/software/crfsuite/
Other
647 stars 208 forks source link

fix: prevent from setting property level of null ptr #113

Closed franklevasseur closed 4 years ago

franklevasseur commented 4 years ago

The code is pretty much self explanatory!

returning variable crf1dt here prevent from line crf1dt->level = LEVEL_NONE; to be executed on a NULL ptr...

Error will be easier to debug for everybody using your lib. I had to debug for at least an hour with printf's to understand where the error came from... (I had no stack trace at all)

feel free to message me if you have any questions!

Good job for this library, it's really usefull.

François

franklevasseur commented 4 years ago

Closing this, but I'll reopen in few minutes.