diff options
author | diva | 2009-05-12 23:06:43 +0000 |
---|---|---|
committer | diva | 2009-05-12 23:06:43 +0000 |
commit | 7bf1d111e2dcb296c554e8b3dbacd6a3fb4ce08c (patch) | |
tree | 9bb28393a2b27dbce5c81929e8bbff36cf18c75b /OpenSim | |
parent | Making SimStatsReporter a little more restrained in requesting the IEstateMod... (diff) | |
download | opensim-SC_OLD-7bf1d111e2dcb296c554e8b3dbacd6a3fb4ce08c.zip opensim-SC_OLD-7bf1d111e2dcb296c554e8b3dbacd6a3fb4ce08c.tar.gz opensim-SC_OLD-7bf1d111e2dcb296c554e8b3dbacd6a3fb4ce08c.tar.bz2 opensim-SC_OLD-7bf1d111e2dcb296c554e8b3dbacd6a3fb4ce08c.tar.xz |
Bug fix in SceneBase.RequestModuleInterface. Check that the list's count is greater than 0.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneBase.cs | 3 |
1 files changed, 2 insertions, 1 deletions
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 | |||
435 | /// <returns>null if there is no registered module implementing that interface</returns> | 435 | /// <returns>null if there is no registered module implementing that interface</returns> |
436 | public T RequestModuleInterface<T>() | 436 | public T RequestModuleInterface<T>() |
437 | { | 437 | { |
438 | if (ModuleInterfaces.ContainsKey(typeof(T))) | 438 | if (ModuleInterfaces.ContainsKey(typeof(T)) && (ModuleInterfaces[typeof(T)].Count > 0)) |
439 | { | 439 | { |
440 | m_log.Debug("[XXX] RequestModuleInterface " + typeof(T).ToString() + " size: " + ModuleInterfaces[typeof(T)].Count); | ||
440 | return (T)ModuleInterfaces[typeof(T)][0]; | 441 | return (T)ModuleInterfaces[typeof(T)][0]; |
441 | } | 442 | } |
442 | else | 443 | else |