Speculative fix for crash with untranslated messages

without | in them (#4521).


git-svn-id: svn://localhost/ardour2/branches/3.0@10838 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-11-29 21:43:40 +00:00
parent d5dc50a407
commit 01acbbea80

View file

@ -336,7 +336,10 @@ sgettext (const char* domain_name, const char* msgid)
{
const char * msgval = dgettext (domain_name, msgid);
if (msgval == msgid) {
msgval = strrchr (msgid, '|') + 1;
const char * p = strrchr (msgid, '|');
if (p) {
msgval = p + 1;
}
}
return msgval;
}