Added a check to GridServerBase.RegisterInterface<T>(T iface), so that it can't try to add duplicate interfaces and cause a exception.
parent
65d413e5ee
commit
869c64f955
|
@ -218,10 +218,13 @@ namespace OpenSim.Grid.GridServer
|
||||||
public void RegisterInterface<T>(T iface)
|
public void RegisterInterface<T>(T iface)
|
||||||
{
|
{
|
||||||
lock (m_gridInterfaces)
|
lock (m_gridInterfaces)
|
||||||
|
{
|
||||||
|
if (!m_gridInterfaces.ContainsKey(typeof(T)))
|
||||||
{
|
{
|
||||||
m_gridInterfaces.Add(typeof(T), iface);
|
m_gridInterfaces.Add(typeof(T), iface);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool TryGet<T>(out T iface)
|
public bool TryGet<T>(out T iface)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue