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
This commit is contained in:
Jan Holesovsky 2019-06-14 18:27:06 +02:00
parent 9794b85ff3
commit 92f83a84b0

View file

@ -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<lok::Office> loKit = std::make_shared<lok::Office>(kit);
static std::shared_ptr<lok::Office> loKit = std::make_shared<lok::Office>(kit);
assert(loKit);
LOOLWSD::LOKitVersion = loKit->getVersionInfo();