Embind: Fix uno_Any.get for null interface values
...which had caused an additional getNull/isNull check for
a469aea9c0 "Emscripten: Towards a working C++ UNO
bridge" to fail
Change-Id: Ibe87ca05f795253c9ede8cab6f96da8fe4496f87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167344
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
This commit is contained in:
@@ -370,7 +370,10 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
|
||||
auto const ifc = *static_cast<css::uno::XInterface* const*>(self.getValue());
|
||||
auto const copy = std::malloc(sizeof(css::uno::XInterface*));
|
||||
*static_cast<css::uno::XInterface**>(copy) = ifc;
|
||||
ifc->acquire();
|
||||
if (ifc != nullptr)
|
||||
{
|
||||
ifc->acquire();
|
||||
}
|
||||
emscripten::internal::WireTypePack argv(std::move(copy));
|
||||
return emscripten::val::take_ownership(
|
||||
_emval_take_value(getTypeId(self.getValueType()), argv));
|
||||
|
||||
Reference in New Issue
Block a user