From 4058d16fc65731b052471b1e119abed78a502d6f Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Thu, 27 Dec 2012 17:43:04 +0100 Subject: [PATCH] do not crash if text string is null --- Vocaluxe/Base/CLanguage.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Vocaluxe/Base/CLanguage.cs b/Vocaluxe/Base/CLanguage.cs index 31689fdc..6f682e09 100644 --- a/Vocaluxe/Base/CLanguage.cs +++ b/Vocaluxe/Base/CLanguage.cs @@ -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;