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
@ -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…
x
Reference in New Issue
Block a user