summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyuno/source/module/pyuno_except.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/pyuno/source/module/pyuno_except.cxx b/pyuno/source/module/pyuno_except.cxx
index 9c21a9e65e4e..cf02bd007534 100644
--- a/pyuno/source/module/pyuno_except.cxx
+++ b/pyuno/source/module/pyuno_except.cxx
@@ -200,8 +200,10 @@ bool isInstanceOfStructOrException( PyObject *obj)
PyRef attr(
PyObject_GetAttrString(obj, "__class__"),
SAL_NO_ACQUIRE );
- return PyObject_HasAttrString(
- attr.get(), "__pyunostruct__");
+ if(attr.is())
+ return PyObject_HasAttrString(attr.get(), "__pyunostruct__");
+ else
+ return false;
}
sal_Bool isInterfaceClass( const Runtime &runtime, PyObject * obj )