diff options
author | Melanie Thielker | 2009-03-29 15:24:50 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-03-29 15:24:50 +0000 |
commit | d857cf1335bee8478f78ac2c3525761344eee253 (patch) | |
tree | 047ce5b37db8a5d191c6594ca91876c01e9a4642 | |
parent | Add AcceptNotices member to GroupMembershipData and an overload to (diff) | |
download | opensim-SC-d857cf1335bee8478f78ac2c3525761344eee253.zip opensim-SC-d857cf1335bee8478f78ac2c3525761344eee253.tar.gz opensim-SC-d857cf1335bee8478f78ac2c3525761344eee253.tar.bz2 opensim-SC-d857cf1335bee8478f78ac2c3525761344eee253.tar.xz |
Don't let a missing configuration cause a NRE
Fixes Mantis #3355
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | 5 |
2 files changed, 11 insertions, 0 deletions
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 | |||
53 | return; | 53 | return; |
54 | 54 | ||
55 | IConfig cnf = config.Configs["Messaging"]; | 55 | IConfig cnf = config.Configs["Messaging"]; |
56 | if (cnf == null) | ||
57 | { | ||
58 | enabled = false; | ||
59 | return; | ||
60 | } | ||
61 | |||
56 | if (cnf != null && cnf.GetString( | 62 | if (cnf != null && cnf.GetString( |
57 | "MuteListModule", "None") != | 63 | "MuteListModule", "None") != |
58 | "MuteListModule") | 64 | "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 | |||
53 | return; | 53 | return; |
54 | 54 | ||
55 | IConfig cnf = config.Configs["Messaging"]; | 55 | IConfig cnf = config.Configs["Messaging"]; |
56 | if (cnf == null) | ||
57 | { | ||
58 | enabled = false; | ||
59 | return; | ||
60 | } | ||
56 | if (cnf != null && cnf.GetString( | 61 | if (cnf != null && cnf.GetString( |
57 | "OfflineMessageModule", "None") != | 62 | "OfflineMessageModule", "None") != |
58 | "OfflineMessageModule") | 63 | "OfflineMessageModule") |