diff options
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/source/module/pyuno_runtime.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index c6d1629c6717..9023d3958af3 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -550,13 +550,19 @@ PyRef Runtime::any2PyObject (const Any &a ) const } case typelib_TypeClass_INTERFACE: { - Reference< XUnoTunnel > tunnel; - a >>= tunnel; - if( tunnel.is() ) + // fdo#46678 must unlock GIL because getSomething could acquire locks, + // and queryInterface too... { - sal_Int64 that = tunnel->getSomething( ::pyuno::Adapter::getUnoTunnelImplementationId() ); - if( that ) - return ((Adapter*)sal::static_int_cast< sal_IntPtr >(that))->getWrappedObject(); + PyThreadDetach d; + + Reference<XUnoTunnel> tunnel; + a >>= tunnel; + if (tunnel.is()) + { + sal_Int64 that = tunnel->getSomething( ::pyuno::Adapter::getUnoTunnelImplementationId() ); + if( that ) + return ((Adapter*)sal::static_int_cast< sal_IntPtr >(that))->getWrappedObject(); + } } //This is just like the struct case: return PyRef( PyUNO_new (a, getImpl()->cargo->xInvocation), SAL_NO_ACQUIRE ); |