From 01070b4de7ef2788e75e7cab163e3a134148a240 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 4 Jul 2019 22:34:11 +0200 Subject: [PATCH] closes https://github.com/assimp/assimp/issues/2439: add null ptr test before calling hasAttr. --- port/PyAssimp/pyassimp/helper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/port/PyAssimp/pyassimp/helper.py b/port/PyAssimp/pyassimp/helper.py index 62384f54f..4003fb5ad 100644 --- a/port/PyAssimp/pyassimp/helper.py +++ b/port/PyAssimp/pyassimp/helper.py @@ -274,6 +274,8 @@ def hasattr_silent(object, name): """ try: + if not object: + return False return hasattr(object, name) except AttributeError: return False