diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs index 1458c95..7bd4fa7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | |||
@@ -136,7 +136,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
136 | // ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); | 136 | // ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); |
137 | 137 | ||
138 | Type returntype = m_comms.LookupReturnType(fname); | 138 | Type returntype = m_comms.LookupReturnType(fname); |
139 | if (returntype != typeof(string)) | 139 | if (returntype != typeof(void)) |
140 | MODError(String.Format("return type mismatch for {0}",fname)); | 140 | MODError(String.Format("return type mismatch for {0}",fname)); |
141 | 141 | ||
142 | modInvoke(fname,parms); | 142 | modInvoke(fname,parms); |
@@ -329,6 +329,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
329 | if (result != null) | 329 | if (result != null) |
330 | return result; | 330 | return result; |
331 | 331 | ||
332 | Type returntype = m_comms.LookupReturnType(fname); | ||
333 | if (returntype == typeof(void)) | ||
334 | return null; | ||
335 | |||
332 | MODError(String.Format("Invocation of {0} failed; null return value",fname)); | 336 | MODError(String.Format("Invocation of {0} failed; null return value",fname)); |
333 | } | 337 | } |
334 | catch (Exception e) | 338 | catch (Exception e) |