mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
292b9aed48
commit
c260ec5c16
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
char *gettextFromC::gettext(const char *text)
|
||||
{
|
||||
return tr(text).toLocal8Bit().data();
|
||||
return strdup(tr(text).toLocal8Bit().data());
|
||||
}
|
||||
|
||||
gettextFromC* gettextFromC::instance()
|
||||
|
|
Loading…
Add table
Reference in a new issue