From d857cf1335bee8478f78ac2c3525761344eee253 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 29 Mar 2009 15:24:50 +0000 Subject: Don't let a missing configuration cause a NRE Fixes Mantis #3355 --- OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs | 6 ++++++ .../CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs index 41441b3..f19696e 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs @@ -53,6 +53,12 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList return; IConfig cnf = config.Configs["Messaging"]; + if (cnf == null) + { + enabled = false; + return; + } + if (cnf != null && cnf.GetString( "MuteListModule", "None") != "MuteListModule") diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 9eb8e27..56eb508 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs @@ -53,6 +53,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage return; IConfig cnf = config.Configs["Messaging"]; + if (cnf == null) + { + enabled = false; + return; + } if (cnf != null && cnf.GetString( "OfflineMessageModule", "None") != "OfflineMessageModule") -- cgit v1.1