From 9c75f8a57e205cc33b0cbf97745ab7ead46da399 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 18 Aug 2016 14:35:28 +0100 Subject: avoid NULL refs --- OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs | 2 ++ OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs | 2 ++ 2 files changed, 4 insertions(+) (limited to 'OpenSim') 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 int i = 0; foreach (GridUserInfo pinfo in pinfos) { + if(pinfo == null) + continue; Dictionary rinfoDict = pinfo.ToKeyValuePairs(); result["griduser" + i] = rinfoDict; 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 int i = 0; foreach (UserAccount acc in accounts) { + if(acc == null) + continue; Dictionary rinfoDict = acc.ToKeyValuePairs(); result["account" + i] = rinfoDict; i++; -- cgit v1.1