Skip to content

Commit a5f0730

Browse files
authored
Merge pull request #65 from snipsco/fix/builtin-parser-destructor
Fix issue with BuiltinEntityParser python destructor
2 parents 8a79a46 + 70668bc commit a5f0730

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platforms/snips-nlu-ontology-python/snips_nlu_ontology/builtin_entities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def __init__(self, language):
125125
"intent parser. See stderr.")
126126

127127
def __del__(self):
128-
if hasattr(self, '_parser'):
128+
if lib is not None and hasattr(self, '_parser'):
129129
lib.snips_nlu_ontology_destroy_builtin_entity_parser(self._parser)
130130

131131
def parse(self, text, scope=None):

0 commit comments

Comments
 (0)