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

Commit f303d743 authored by Caroline Tice's avatar Caroline Tice Committed by George Burgess IV
Browse files

Remove null-ptr deref compiler warning.

This CL removes the following compiler warning:
frameworks/av/media/libstagefright/MPEG4Extractor.cpp:1025:35
warning: Access to field 'next' results in a dereference of a null
pointer (loaded from variable 'cur')
[clang-analyzer-core.NullDereference]

Bug: None
Test: Compiled with change and no warning.
Change-Id: I365843068b098b111c281ac293a0b0b3aa2ec875
parent 76321a33
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -989,7 +989,9 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
                        while (cur && cur->next != mLastTrack) {
                            cur = cur->next;
                        }
                        if (cur) {
                            cur->next = NULL;
                        }
                        delete mLastTrack;
                        mLastTrack = cur;
                    }