diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-22 10:17:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-22 13:15:08 +0100 |
commit | 962a9ce0a1ebe63f341fa27af8203991c44dd56f (patch) | |
tree | f5f65631eed4e1b2b3744f26f04f955028f48c51 /pyuno/source | |
parent | d9fe5f17eeec56d91cd6792adf134579b51e83d2 (diff) |
cid#1473905 Dereference after null check
Change-Id: I949971374a68156ba78dce3b8d058774b1bef816
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112872
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'pyuno/source')
-rw-r--r-- | pyuno/source/module/pyuno_runtime.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 91caaffb457c..10257a8ef69e 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -638,9 +638,9 @@ bool Runtime::pyIterUnpack( PyObject *const pObj, Any &a ) const return true; } -Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) const +Any Runtime::pyObject2Any(const PyRef & source, enum ConversionMode mode) const { - if( ! impl->cargo->valid ) + if (!impl || !impl->cargo->valid) { throw RuntimeException("pyuno runtime must be initialized before calling any2PyObject" ); } |