@@ -307,7 +307,7 @@ internal static void HandleCommand(uint clientId, BitReader reader, int channelI
307
307
MethodInfo targetMethod = null ;
308
308
if ( behaviour . cachedMethods . ContainsKey ( hash ) )
309
309
targetMethod = behaviour . cachedMethods [ hash ] ;
310
-
310
+ else return ; //No method
311
311
ParameterInfo [ ] parameters = targetMethod . GetParameters ( ) ;
312
312
object [ ] methodParams = new object [ parameters . Length ] ;
313
313
for ( int i = 0 ; i < parameters . Length ; i ++ )
@@ -327,6 +327,7 @@ internal static void HandleRpc(uint clientId, BitReader reader, int channelId)
327
327
MethodInfo targetMethod = null ;
328
328
if ( behaviour . cachedMethods . ContainsKey ( hash ) )
329
329
targetMethod = behaviour . cachedMethods [ hash ] ;
330
+ else return ; //No method
330
331
ParameterInfo [ ] parameters = targetMethod . GetParameters ( ) ;
331
332
object [ ] methodParams = new object [ parameters . Length ] ;
332
333
for ( int i = 0 ; i < parameters . Length ; i ++ )
@@ -346,6 +347,7 @@ internal static void HandleTargetRpc(uint clientId, BitReader reader, int channe
346
347
MethodInfo targetMethod = null ;
347
348
if ( behaviour . cachedMethods . ContainsKey ( hash ) )
348
349
targetMethod = behaviour . cachedMethods [ hash ] ;
350
+ else return ; //No method
349
351
ParameterInfo [ ] parameters = targetMethod . GetParameters ( ) ;
350
352
object [ ] methodParams = new object [ parameters . Length ] ;
351
353
for ( int i = 0 ; i < parameters . Length ; i ++ )
0 commit comments