Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d98a089 authored by Manuel Roman's avatar Manuel Roman
Browse files

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
parent 993f8a8c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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