avoid a null ref

0.9.1.1
UbitUmarov 2019-11-02 21:53:12 +00:00
parent 26b5affb04
commit f2cf3b201b
1 changed files with 2 additions and 0 deletions

View File

@ -294,6 +294,8 @@ namespace OpenSim.Services.UserAccountService
public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs)
{
UserAccountData[] ret = m_Database.GetUsersWhere(scopeID, "PrincipalID in ('" + String.Join("', '", IDs) + "')");
if(ret == null || ret.Length == 0)
return new List<UserAccount>();
return new List<UserAccount>(ret.Select((x) => MakeUserAccount(x)));
}