diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index c83c2a6f9b..91acfbeb0d 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -221,9 +221,12 @@ namespace OpenSim.Framework.Communications.Capabilities /// public void DeregisterHandlers() { - foreach (string capsName in m_capsHandlers.Caps) + if (m_capsHandlers != null) { - m_capsHandlers.Remove(capsName); + foreach (string capsName in m_capsHandlers.Caps) + { + m_capsHandlers.Remove(capsName); + } } }