From f85638485cdc1ddd25f322ea4c30a386351f4bd5 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Thu, 19 May 2011 14:46:28 +0100 Subject: don't crash when interacting with a class that implements XInvocation VclStringResourceLoader eg. test = smgr.createInstance("com.sun.star.resource.VclStringResourceLoader") invocation = test.setValue("FileName", "test") It seems we can't cope with XInvocation implementors, so give a nice exception instead --- pyuno/source/module/pyuno_callable.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pyuno/source/module/pyuno_callable.cxx') diff --git a/pyuno/source/module/pyuno_callable.cxx b/pyuno/source/module/pyuno_callable.cxx index c1451683f17f..2bd2a7da2fa8 100644 --- a/pyuno/source/module/pyuno_callable.cxx +++ b/pyuno/source/module/pyuno_callable.cxx @@ -256,6 +256,8 @@ PyRef PyUNO_callable_new ( { PyUNO_callable* self; + OSL_ENSURE (my_inv.is(), "XInvocation must be valid"); + self = PyObject_New (PyUNO_callable, &PyUNO_callable_Type); if (self == NULL) return NULL; //NULL == Error! -- cgit v1.2.1