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

Commit 12604519 authored by Dan Albert's avatar Dan Albert
Browse files

Check for NULL before calling asBinder().

The old asBinder() checked if this == NULL, which is undefined behavior.

Change-Id: Ibde628395ca10dfef0d2f59e81280576f104b83c
parent 14fc930d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -148,7 +148,8 @@ status_t BpDrmManagerService::setDrmServiceListener(

    data.writeInterfaceToken(IDrmManagerService::getInterfaceDescriptor());
    data.writeInt32(uniqueId);
    data.writeStrongBinder(drmServiceListener->asBinder());
    data.writeStrongBinder(
        drmServiceListener != NULL ? drmServiceListener->asBinder() : NULL);
    remote()->transact(SET_DRM_SERVICE_LISTENER, data, &reply);
    return reply.readInt32();
}