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>
This commit is contained in:
Caolán McNamara 2021-03-22 10:17:17 +00:00
parent d9fe5f17ee
commit 962a9ce0a1

View file

@ -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" );
}