diff options
Diffstat (limited to 'OpenSim/ApplicationPlugins/RegionModulesController')
-rw-r--r-- | OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index ddc37ed..6c0c74d 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs | |||
@@ -341,14 +341,15 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
341 | 341 | ||
342 | // Actually load it | 342 | // Actually load it |
343 | INonSharedRegionModule module = null; | 343 | INonSharedRegionModule module = null; |
344 | try | 344 | |
345 | { | 345 | Type[] ctorParamTypes = new Type[ctorArgs.Length]; |
346 | for (int i = 0; i < ctorParamTypes.Length; i++) | ||
347 | ctorParamTypes[i] = ctorArgs[i].GetType(); | ||
348 | |||
349 | if (node.Type.GetConstructor(ctorParamTypes) != null) | ||
346 | module = (INonSharedRegionModule)Activator.CreateInstance(node.Type, ctorArgs); | 350 | module = (INonSharedRegionModule)Activator.CreateInstance(node.Type, ctorArgs); |
347 | } | 351 | else |
348 | catch | ||
349 | { | ||
350 | module = (INonSharedRegionModule)Activator.CreateInstance(node.Type); | 352 | module = (INonSharedRegionModule)Activator.CreateInstance(node.Type); |
351 | } | ||
352 | 353 | ||
353 | // Check for replaceable interfaces | 354 | // Check for replaceable interfaces |
354 | Type replaceableInterface = module.ReplaceableInterface; | 355 | Type replaceableInterface = module.ReplaceableInterface; |