Commit ac00a0bc authored by Scott Vokes's avatar Scott Vokes
Browse files

Add asserts to provide better details on NULL result pointers.

These should be safely filtered out upstream now, but this will
log better root cause info if any of them are NULL for other reasons.
parent 6eadfca8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -251,11 +251,16 @@ void KineticController_HandleUnexpectedResponse(void *msg,
void KineticController_HandleResult(bus_msg_result_t *res, void *udata)
{
    KineticOperation* op = udata;
    KINETIC_ASSERT(op);
    KINETIC_ASSERT(op->connection);

    KineticStatus status = bus_to_kinetic_status(res->status);

    if (status == KINETIC_STATUS_SUCCESS) {
        KineticResponse * response = res->u.response.opaque_msg;
        KINETIC_ASSERT(response);
        KINETIC_ASSERT(response->command);
        KINETIC_ASSERT(response->command->header);

        if (response->command != NULL &&
            response->command->status != NULL &&