diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-10-08 13:22:32 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-10-08 13:26:01 -0700 |
commit | c260ec5c1673f9071b0c9c5407944ecb35bf5ff2 (patch) | |
tree | e18767928002e6fe8f5d577162b982a0c51b3d25 /gettextfromc.cpp | |
parent | 292b9aed481f5d1b98494bada5e8bf0551323771 (diff) | |
download | subsurface-c260ec5c1673f9071b0c9c5407944ecb35bf5ff2.tar.gz |
Make a copy of the translated text
Otherwise the translation will get freed (and often reused) before it
makes it to the screen.
The problem with this is that it leaks memory for every translation.
Reported-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gettextfromc.cpp')
-rw-r--r-- | gettextfromc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gettextfromc.cpp b/gettextfromc.cpp index 4976d70f8..fe6263a4b 100644 --- a/gettextfromc.cpp +++ b/gettextfromc.cpp @@ -4,7 +4,7 @@ char *gettextFromC::gettext(const char *text) { - return tr(text).toLocal8Bit().data(); + return strdup(tr(text).toLocal8Bit().data()); } gettextFromC* gettextFromC::instance() |