do not crash if text string is null
This commit is contained in:
1 parent
bfa470eaab
commit
4058d16fc6
1 file changed
+6
@@ -99,6 +99,9 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static string Translate(string KeyWord, int PartyModeID)
|
||||
{
|
||||
if (KeyWord == null)
|
||||
return "Error";
|
||||
|
||||
if (KeyWord.Length < 3)
|
||||
return KeyWord;
|
||||
|
||||
@@ -163,6 +166,9 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static bool TranslationExists(string KeyWord, int PartyModeID)
|
||||
{
|
||||
if (KeyWord == null)
|
||||
return false;
|
||||
|
||||
if (KeyWord.Length < 3)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in new issue
Block a user