From 92f83a84b027eed54b30336823a9a31b56ced4c3 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Fri, 14 Jun 2019 18:27:06 +0200 Subject: [PATCH] android: Don't re-initialize LibreOfficeKit over and over again. LOK is designed to be initialized just once, so avoid the re-initialization here. Change-Id: I7ad9235c36d5a4dee85437a95f358d13ca25a2a9 --- kit/Kit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();