Kaydet (Commit) db682ae5 authored tarafından Tor Lillqvist's avatar Tor Lillqvist Kaydeden (comit) Tomaž Vajngerl

The 'bInitialized' state needs to be global, and unset in lo_destroy()

I assume, for lo_destroy() to be useful at all. Not that I know for sure what
the exact intended semantics of lo_destroy() and lo_initialize() are. But I
assume that the idea is that after lo_destroy() has been called,
lo_initialize() can be called again.

Change-Id: I2dea26db150d19ed438427e1c119a5297b9bc9c3
üst 66974e68
......@@ -650,11 +650,12 @@ static void* lo_startmain(void*)
return 0;
}
static bool bInitialized = false;
static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath)
{
LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
static bool bInitialized = false;
if (bInitialized)
return 1;
......@@ -769,10 +770,14 @@ static void lo_destroy(LibreOfficeKit *pThis)
LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
gImpl = NULL;
SAL_INFO("lok", "lo_destroy");
Application::Quit();
pthread_join(pLib->maThread, NULL);
delete pLib;
bInitialized = false;
SAL_INFO("lok", "lo_destroy done");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment