Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/4309

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/09/4309/1

PyUno fixed crash in function isInstanceOfStructOrException()

when we try to call PyUNO_callable object that doesn't have __class__ attribute

Change-Id: Ia05f70d70f248d50aa141b09625f7ec50189e1dd
---
M pyuno/source/module/pyuno_except.cxx
1 file changed, 4 insertions(+), 2 deletions(-)



diff --git a/pyuno/source/module/pyuno_except.cxx b/pyuno/source/module/pyuno_except.cxx
index 9c21a9e..cf02bd0 100644
--- a/pyuno/source/module/pyuno_except.cxx
+++ b/pyuno/source/module/pyuno_except.cxx
@@ -200,8 +200,10 @@
     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 )

-- 
To view, visit https://gerrit.libreoffice.org/4309
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia05f70d70f248d50aa141b09625f7ec50189e1dd
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Xiaoli Duan <duan19002009@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.