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:
Stephan Bergmann
2024-05-09 18:48:29 +02:00
parent 227078bc8d
commit c6f39e2dee
2 changed files with 21 additions and 1 deletions
@@ -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));