commit | 60f3e2bae776f9289746f2f9bebb7d2f6b03355e | [log] [tgz] |
---|---|---|
author | Robert Shih <robertshih@google.com> | Wed Sep 09 23:03:04 2015 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Wed Sep 09 23:03:04 2015 +0000 |
tree | 00a13e22f6cd11965b1ff24c0c7c1e35f1912eac | |
parent | 38a1bf53f244617fdf7cc9c0c378966248651405 [diff] | |
parent | 1dadfe4fd466b5eab10e5aefa1343e53fbf4cb17 [diff] |
Merge "fix NPE in freeNode"
diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp index cb7ab5e..8694a04 100644 --- a/media/libstagefright/omx/OMX.cpp +++ b/media/libstagefright/omx/OMX.cpp
@@ -261,6 +261,10 @@ status_t OMX::freeNode(node_id node) { OMXNodeInstance *instance = findInstance(node); + if (instance == NULL) { + return OK; + } + { Mutex::Autolock autoLock(mLock); ssize_t index = mLiveNodes.indexOfKey(IInterface::asBinder(instance->observer()));