diff options
author | UbitUmarov | 2016-08-18 14:35:28 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-18 14:35:28 +0100 |
commit | 9c75f8a57e205cc33b0cbf97745ab7ead46da399 (patch) | |
tree | 584891db1713c219b943694ad94be1b1855e2f04 | |
parent | allow cap HomeLocation to be disabled setting Cap_HomeLocation = "" (diff) | |
download | opensim-SC-9c75f8a57e205cc33b0cbf97745ab7ead46da399.zip opensim-SC-9c75f8a57e205cc33b0cbf97745ab7ead46da399.tar.gz opensim-SC-9c75f8a57e205cc33b0cbf97745ab7ead46da399.tar.bz2 opensim-SC-9c75f8a57e205cc33b0cbf97745ab7ead46da399.tar.xz |
avoid NULL refs
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs | 2 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs index b63b594..8806c2c 100644 --- a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs +++ b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs | |||
@@ -228,6 +228,8 @@ namespace OpenSim.Server.Handlers.GridUser | |||
228 | int i = 0; | 228 | int i = 0; |
229 | foreach (GridUserInfo pinfo in pinfos) | 229 | foreach (GridUserInfo pinfo in pinfos) |
230 | { | 230 | { |
231 | if(pinfo == null) | ||
232 | continue; | ||
231 | Dictionary<string, object> rinfoDict = pinfo.ToKeyValuePairs(); | 233 | Dictionary<string, object> rinfoDict = pinfo.ToKeyValuePairs(); |
232 | result["griduser" + i] = rinfoDict; | 234 | result["griduser" + i] = rinfoDict; |
233 | i++; | 235 | i++; |
diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs index 9efe741..237ffc7 100644 --- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs +++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs | |||
@@ -235,6 +235,8 @@ namespace OpenSim.Server.Handlers.UserAccounts | |||
235 | int i = 0; | 235 | int i = 0; |
236 | foreach (UserAccount acc in accounts) | 236 | foreach (UserAccount acc in accounts) |
237 | { | 237 | { |
238 | if(acc == null) | ||
239 | continue; | ||
238 | Dictionary<string, object> rinfoDict = acc.ToKeyValuePairs(); | 240 | Dictionary<string, object> rinfoDict = acc.ToKeyValuePairs(); |
239 | result["account" + i] = rinfoDict; | 241 | result["account" + i] = rinfoDict; |
240 | i++; | 242 | i++; |