commit | 59e469e0b0d95bba2aee3bbda003b7042fd1cdd9 | [log] [tgz] |
---|---|---|
author | Marco Nelissen <marcone@google.com> | Fri Sep 11 11:19:27 2015 -0700 |
committer | Marco Nelissen <marcone@google.com> | Fri Sep 11 11:19:27 2015 -0700 |
tree | 414d01ca10e525ce1b1599f8700aa53d5a21d6d9 | |
parent | 58cfee58b835de185b55808ebc475392f4e617f6 [diff] [blame] |
Fix a few potential crashes Change-Id: Icb71cb07495406be756e195f2578b6e3aa8b1163
diff --git a/media/ndk/NdkMediaFormat.cpp b/media/ndk/NdkMediaFormat.cpp index a354d58..5598d5d 100644 --- a/media/ndk/NdkMediaFormat.cpp +++ b/media/ndk/NdkMediaFormat.cpp
@@ -46,6 +46,10 @@ ALOGV("private ctor"); AMediaFormat* mData = new AMediaFormat(); mData->mFormat = *((sp<AMessage>*)data); + if (mData->mFormat == NULL) { + ALOGW("got NULL format"); + mData->mFormat = new AMessage; + } return mData; }