mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Localization: make cache thread safe and robust against use-after-free
The old trGettext() was not thread-safe and the returned C-strings could be freed in the case of empty translations strings. Therefore: 1) Introduce a mutex protecting access to the cache. 2) Never change existing entries, even if the translation string is empty. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
879cb73b8b
commit
db0dd54c37
2 changed files with 9 additions and 4 deletions
|
@ -14,6 +14,7 @@
|
|||
#include <QToolBar>
|
||||
#include <QStatusBar>
|
||||
|
||||
#include "core/gettextfromc.h"
|
||||
#include "core/version.h"
|
||||
#include "core/subsurface-string.h"
|
||||
#include "desktop-widgets/divelistview.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue