summaryrefslogtreecommitdiff
path: root/pyuno/source/module/pyuno_callable.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-05-19 14:46:28 +0100
committerMichael Meeks <michael.meeks@novell.com>2011-05-19 14:50:35 +0100
commitf85638485cdc1ddd25f322ea4c30a386351f4bd5 (patch)
treedc7e0618ce18734d6e617e956a31dc2efc46b2be /pyuno/source/module/pyuno_callable.cxx
parent31c1e6f573498364497480615eb072944c0d9d17 (diff)
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
Diffstat (limited to 'pyuno/source/module/pyuno_callable.cxx')
-rw-r--r--pyuno/source/module/pyuno_callable.cxx2
1 files changed, 2 insertions, 0 deletions
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!