From 3326effb5fb0ec4ac84cb63a693a7025ad13f314 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 29 Apr 2008 16:26:49 +0000 Subject: Stuck an exception handler in the friends routine until I have time to debug it more seriously.(or someone else does). It prints a 'Unable to enumerate' message on the console.. so it won't be forgotten. It isn't critical data atm though. --- OpenSim/Region/Environment/Modules/FriendsModule.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Environment/Modules') diff --git a/OpenSim/Region/Environment/Modules/FriendsModule.cs b/OpenSim/Region/Environment/Modules/FriendsModule.cs index 7e12618..7078906 100644 --- a/OpenSim/Region/Environment/Modules/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/FriendsModule.cs @@ -225,13 +225,23 @@ namespace OpenSim.Region.Environment.Modules for (int j = 0; j < flfli.Count; j++) { - if (flfli[i].Friend == AgentId) + try { - flfli[i].onlinestatus = false; - } + if (flfli[i].Friend == AgentId) + { + flfli[i].onlinestatus = false; + } + } + + catch (IndexOutOfRangeException) + { + // Ignore the index out of range exception. + // This causes friend lists to get out of sync slightly.. however + // prevents a sim crash. + m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off"); + } } - } -- cgit v1.1