From 7bf1d111e2dcb296c554e8b3dbacd6a3fb4ce08c Mon Sep 17 00:00:00 2001 From: diva Date: Tue, 12 May 2009 23:06:43 +0000 Subject: Bug fix in SceneBase.RequestModuleInterface. Check that the list's count is greater than 0. --- OpenSim/Region/Framework/Scenes/SceneBase.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index 6510a0c..4efcb63 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs @@ -435,8 +435,9 @@ namespace OpenSim.Region.Framework.Scenes /// null if there is no registered module implementing that interface public T RequestModuleInterface() { - if (ModuleInterfaces.ContainsKey(typeof(T))) + if (ModuleInterfaces.ContainsKey(typeof(T)) && (ModuleInterfaces[typeof(T)].Count > 0)) { + m_log.Debug("[XXX] RequestModuleInterface " + typeof(T).ToString() + " size: " + ModuleInterfaces[typeof(T)].Count); return (T)ModuleInterfaces[typeof(T)][0]; } else -- cgit v1.1