diff --git a/unotest/source/embindtest/embindtest.cxx b/unotest/source/embindtest/embindtest.cxx index 02a5a39c3016..1460825ecbbf 100644 --- a/unotest/source/embindtest/embindtest.cxx +++ b/unotest/source/embindtest/embindtest.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -930,11 +931,11 @@ class Test : public cppu::WeakImplHelper sal_Bool SAL_CALL testSolarMutex() override { - TestThread t; - t.launch(); - t.join(); + rtl::Reference t(new TestThread); + t->launch(); + t->join(); SolarMutexGuard g; - return t.value; + return t->value; } OUString stringAttribute_ = u"hä"_ustr;