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

Commit 0e31902a authored by kai's avatar kai
Browse files

AvrcpCtrSM check BrowseNode

Make sure BrowseNode is not null before we use it.

Bug: 70563386
Test: Connect IPhone with Mojave
Change-Id: I4d32800826049a3b51ece4f8ee8e4a16ed73fe31
(cherry picked from commit cc34c90a15e1d75a13228682ef13dbbb32b9298e)
parent 816621a4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -625,6 +625,10 @@ class AvrcpControllerStateMachine extends StateMachine {

        private void sendFolderBroadcastAndUpdateNode() {
            BrowseTree.BrowseNode bn = mBrowseTree.findBrowseNodeByID(mID);
            if (bn == null) {
                Log.e(TAG, "Can not find BrowseNode by ID: " + mID);
                return;
            }
            if (bn.isPlayer()) {
                // Add the now playing folder.
                MediaDescription.Builder mdb = new MediaDescription.Builder();