From 4a0f17ecb9de0c8d8712d6458dc63b7edff1dc5b Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Wed, 12 Jul 2006 22:37:03 +0000 Subject: [PATCH] Fix null pointer exception --- CASA/gui/Config.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CASA/gui/Config.cs b/CASA/gui/Config.cs index c57214fc..42b06f4f 100644 --- a/CASA/gui/Config.cs +++ b/CASA/gui/Config.cs @@ -15,6 +15,13 @@ namespace Novell.CASA.GUI { uiPolicy = (UIPol)ICASAPol.GetPolicy(CASAPolType.UI_POL); } + + // if there is no uiPolicy, create one + if (uiPolicy == null) + { + uiPolicy = new UIPol(false, false, false, "", null); + ICASAPol.SetPolicy(uiPolicy); + } } public void SetConfigSetting(string sName, bool bValue)