aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index 23d5b3c..febd4ca 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -365,6 +365,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
365 List<UUID> GetOnlineFriends(UUID userID) 365 List<UUID> GetOnlineFriends(UUID userID)
366 { 366 {
367 List<string> friendList = new List<string>(); 367 List<string> friendList = new List<string>();
368 List<UUID> online = new List<UUID>();
368 369
369 foreach (FriendInfo fi in m_Friends[userID].Friends) 370 foreach (FriendInfo fi in m_Friends[userID].Friends)
370 { 371 {
@@ -372,9 +373,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
372 friendList.Add(fi.Friend); 373 friendList.Add(fi.Friend);
373 } 374 }
374 375
375 PresenceInfo[] presence = PresenceService.GetAgents(friendList.ToArray()); 376 if (friendList.Count == 0)
377 // no friends whatsoever
378 return online;
376 379
377 List<UUID> online = new List<UUID>(); 380 PresenceInfo[] presence = PresenceService.GetAgents(friendList.ToArray());
378 381
379 foreach (PresenceInfo pi in presence) 382 foreach (PresenceInfo pi in presence)
380 { 383 {