diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-10-23 07:59:12 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-10-23 20:47:38 +0200 |
commit | 84a54f6c388d3abe1d6f6e04bf07441ae96f60cd (patch) | |
tree | ce8c4f7c063a174bbd594205a6c367355ced5e64 /sal | |
parent | fd7549f4c6197cdbdfc97e949487723cd00a663e (diff) |
move access inside mutex guard
Change-Id: I784fbc3b39a645c7984aa836cc32980343ddd1f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124095
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/backtraceapi.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sal/osl/unx/backtraceapi.cxx b/sal/osl/unx/backtraceapi.cxx index bd8db79e0181..a4cec46ca95b 100644 --- a/sal/osl/unx/backtraceapi.cxx +++ b/sal/osl/unx/backtraceapi.cxx @@ -206,8 +206,9 @@ OUString sal::backtrace_to_string(BacktraceState* backtraceState) void* addr = backtraceState->buffer[i]; std::unique_lock guard(frameCacheMutex); auto it = frameCache.find(addr); + bool found = it != frameCache.end(); guard.unlock(); - if( it != frameCache.end()) + if( found ) { frameData[ i ].info = it->second; frameData[ i ].handled = true; |