do not crash if text string is null

This commit is contained in:
Alexander Eckart committed 2012-12-27 17:43:04 +01:00
1 parent bfa470eaab
commit 4058d16fc6
1 file changed
+6
+6
View File
@@ -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;