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

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

Merge "Check for nullptr when creating offline camera descriptor"

parents 52568144 417e43d9
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -2094,6 +2094,10 @@ status_t CameraService::addOfflineClient(String8 cameraId, sp<BasicClient> offli
                onlineClientDesc->getOwnerId(), onlinePriority.getState(),
                onlineClientDesc->getOwnerId(), onlinePriority.getState(),
                // native clients don't have offline processing support.
                // native clients don't have offline processing support.
                /*ommScoreOffset*/ 0, /*systemNativeClient*/false);
                /*ommScoreOffset*/ 0, /*systemNativeClient*/false);
        if (offlineClientDesc == nullptr) {
            ALOGE("%s: Offline client descriptor was NULL", __FUNCTION__);
            return BAD_VALUE;
        }


        // Allow only one offline device per camera
        // Allow only one offline device per camera
        auto incompatibleClients = mActiveClientManager.getIncompatibleClients(offlineClientDesc);
        auto incompatibleClients = mActiveClientManager.getIncompatibleClients(offlineClientDesc);