Kaydet (Commit) 4231274a authored tarafından Michael Stahl's avatar Michael Stahl

tdf#76845: vcl: main thread does not necessarily have SolarMutex

... at least not if VCLXWindowImpl::OnProcessCallbacks drops it and
calls arbitrary event handlers.

So try to make nested SolarMutexReleaser work in that case (although
poorly).

Change-Id: I1e2a1f4d6f42f826692696f7d92d1c3d71291f39
üst 1f45a84a
...@@ -394,9 +394,9 @@ void Application::ReAcquireSolarMutex(sal_uLong const nReleased) ...@@ -394,9 +394,9 @@ void Application::ReAcquireSolarMutex(sal_uLong const nReleased)
{ {
// 0 would mean that events/timers will be handled without locking // 0 would mean that events/timers will be handled without locking
// SolarMutex (racy) // SolarMutex (racy)
assert(nReleased != 0); SAL_WARN_IF(nReleased == 0, "vcl", "SolarMutexReleaser without SolarMutex");
#ifdef WNT #ifdef WNT
if (ImplGetSVData()->mbDeInit) // do not Yield in DeInitVCL if (nReleased == 0 || ImplGetSVData()->mbDeInit) //do not Yield in DeInitVCL
AcquireSolarMutex(nReleased); AcquireSolarMutex(nReleased);
else else
ImplYield(false, false, nReleased); ImplYield(false, false, nReleased);
......
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