fix: check before destroy callback

This commit is contained in:
dantmnf
2024-06-11 23:42:17 +08:00
parent 33bca2e82a
commit 1b2cc439f2
2 changed files with 4 additions and 3 deletions

View File

@@ -93,8 +93,7 @@ class Asst:
self.__ptr = Asst.__lib.AsstCreate()
def __del__(self):
if self.__callback:
Asst.__lib.AsstDestroy(self.__ptr)
Asst.__lib.AsstDestroy(self.__ptr)
self.__ptr = None
def set_instance_option(self, option_type: InstanceOptionType, option_value: str):