incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arie...@apache.org
Subject svn commit: r1232123 - /incubator/ooo/trunk/main/pyuno/source/module/pyuno_adapter.cxx
Date Mon, 16 Jan 2012 19:27:23 GMT
Author: arielch
Date: Mon Jan 16 19:27:22 2012
New Revision: 1232123

URL: http://svn.apache.org/viewvc?rev=1232123&view=rev
Log:
i118798 - Fix Pyuno dead-lock

Modified:
    incubator/ooo/trunk/main/pyuno/source/module/pyuno_adapter.cxx

Modified: incubator/ooo/trunk/main/pyuno/source/module/pyuno_adapter.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/pyuno/source/module/pyuno_adapter.cxx?rev=1232123&r1=1232122&r2=1232123&view=diff
==============================================================================
--- incubator/ooo/trunk/main/pyuno/source/module/pyuno_adapter.cxx (original)
+++ incubator/ooo/trunk/main/pyuno/source/module/pyuno_adapter.cxx Mon Jan 16 19:27:22 2012
@@ -363,20 +363,20 @@ Any Adapter::invoke( const OUString &aFu
 void Adapter::setValue( const OUString & aPropertyName, const Any & value )
     throw( UnknownPropertyException, CannotConvertException, InvocationTargetException,RuntimeException)
 {
+    if( !hasProperty( aPropertyName ) )
+    {
+        OUStringBuffer buf;
+        buf.appendAscii( "pyuno::Adapater: Property " ).append( aPropertyName );
+        buf.appendAscii( " is unknown." );
+        throw UnknownPropertyException( buf.makeStringAndClear(), Reference< XInterface
> () );
+    }
+
     PyThreadAttach guard( mInterpreter );
     try
     {
         Runtime runtime;
         PyRef obj = runtime.any2PyObject( value );
 
-        if( !hasProperty( aPropertyName ) )
-        {
-            OUStringBuffer buf;
-            buf.appendAscii( "pyuno::Adapater: Property " ).append( aPropertyName );
-            buf.appendAscii( " is unknown." );
-            throw UnknownPropertyException( buf.makeStringAndClear(), Reference< XInterface
> () );
-        }
-        
         PyObject_SetAttrString(
             mWrappedObject.get(), (char*)TO_ASCII(aPropertyName), obj.get() );
         raiseInvocationTargetExceptionWhenNeeded( runtime);



Mime
View raw message