diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs index 9078a142ea..2d6e27f0a4 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs @@ -238,6 +238,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends // prevents a sim crash. m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off"); } + catch (ArgumentOutOfRangeException) + { + // 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"); + } for (int j = 0; j < flfli.Count; j++) {