diff --git a/kit/Kit.cpp b/kit/Kit.cpp index d5a9f37bc..b0f3e32c2 100644 --- a/kit/Kit.cpp +++ b/kit/Kit.cpp @@ -2702,12 +2702,12 @@ void lokit_main( Poco::URI userInstallationURI("file", LO_PATH); LibreOfficeKit *kit = lok_init_2(LO_PATH "/program", userInstallationURI.toString().c_str()); #else - LibreOfficeKit *kit = lok_init_2(nullptr, nullptr); + static LibreOfficeKit *kit = lok_init_2(nullptr, nullptr); #endif assert(kit); - std::shared_ptr loKit = std::make_shared(kit); + static std::shared_ptr loKit = std::make_shared(kit); assert(loKit); LOOLWSD::LOKitVersion = loKit->getVersionInfo();