summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/source/unoembindhelpers/PrimaryBindings.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 4972699178c8..9f9a5cf588d5 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -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));