Author: gedmurphy
Date: Tue Apr 22 16:56:34 2008
New Revision: 33114
URL:
http://svn.reactos.org/svn/reactos?rev=33114&view=rev
Log:
protect missing keys
Modified:
trunk/tools/Message Translator/GUI/Program.cs
Modified: trunk/tools/Message Translator/GUI/Program.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/GUI/Pro…
==============================================================================
--- trunk/tools/Message Translator/GUI/Program.cs [iso-8859-1] (original)
+++ trunk/tools/Message Translator/GUI/Program.cs [iso-8859-1] Tue Apr 22 16:56:34 2008
@@ -44,10 +44,17 @@
string regPath = @"Software\ReactOS\MsgTrans";
string keyName = "HideOnMin";
- RegistryKey rk = Registry.CurrentUser.CreateSubKey(regPath);
- string hideOnMin = rk.GetValue(keyName).ToString();
+ try
+ {
+ RegistryKey rk = Registry.CurrentUser.CreateSubKey(regPath);
+ string hideOnMin = rk.GetValue(keyName).ToString();
- return Convert.ToBoolean(hideOnMin);
+ return Convert.ToBoolean(hideOnMin);
+ }
+ catch (Exception)
+ {
+ return false;
+ }
}
private void InitializeContext()