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

Commit 76cfc06b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix potential null dereference in SoundTriggerHwService"

parents ed1abbfc c8a9f4ad
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -923,7 +923,10 @@ SoundTriggerHwService::ModuleClient::ModuleClient(const sp<Module>& module,

void SoundTriggerHwService::ModuleClient::onFirstRef()
{
    IInterface::asBinder(mClient)->linkToDeath(this);
    sp<IBinder> binder = IInterface::asBinder(mClient);
    if (binder != 0) {
        binder->linkToDeath(this);
    }
}

SoundTriggerHwService::ModuleClient::~ModuleClient()