Check result handler is not null
If caller passes a null result handler to the proxy methods, we need to check it when getting the result. Otherwise we try to invoke a method on a null object Change-Id: Ic2f456c36cb542b782b6a6d0d4d607ccf0987496
This commit is contained in:
@@ -784,7 +784,10 @@ generate_result_dispatcher_method(const method_type* method,
|
||||
}
|
||||
|
||||
// Call the callback method
|
||||
dispatchMethod->statements->Add(realCall);
|
||||
IfStatement* ifst = new IfStatement;
|
||||
ifst->expression = new Comparison(new FieldVariable(THIS_VALUE, "callback"), "!=", NULL_VALUE);
|
||||
dispatchMethod->statements->Add(ifst);
|
||||
ifst->statements->Add(realCall);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user