closes https://github.com/assimp/assimp/issues/2439: add null ptr test before calling hasAttr.

pull/2533/head
Kim Kulling 2019-07-04 22:34:11 +02:00
parent 5a82e27885
commit 01070b4de7
1 changed files with 2 additions and 0 deletions

View File

@ -274,6 +274,8 @@ def hasattr_silent(object, name):
""" """
try: try:
if not object:
return False
return hasattr(object, name) return hasattr(object, name)
except AttributeError: except AttributeError:
return False return False