diff options
author | Mathias Agopian <mathias@google.com> | 2011-02-28 12:50:25 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-02-28 12:50:25 -0800 |
commit | 7c4beadf57c893f17efc0550b13498a06958f90c (patch) | |
tree | 2be15d162de6aa06018545e21dd71faa226204cb /libs | |
parent | d5dac80fed2a85944060e8b1192eff9dee77ac4d (diff) | |
parent | a1c7e0e706bd32fec7a06456beccbdf090cb8c76 (diff) | |
download | frameworks_base-7c4beadf57c893f17efc0550b13498a06958f90c.zip frameworks_base-7c4beadf57c893f17efc0550b13498a06958f90c.tar.gz frameworks_base-7c4beadf57c893f17efc0550b13498a06958f90c.tar.bz2 |
Merge "surfaceflinger_client: Don't dereference NULL ptrs."
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaceflinger_client/Surface.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/surfaceflinger_client/Surface.cpp b/libs/surfaceflinger_client/Surface.cpp index 1e9bd74..68611d6 100644 --- a/libs/surfaceflinger_client/Surface.cpp +++ b/libs/surfaceflinger_client/Surface.cpp @@ -1040,7 +1040,7 @@ int Surface::getBufferIndex(const sp<GraphicBuffer>& buffer) const // e.g. if GraphicBuffer is used to wrap an android_native_buffer_t that // was dequeued from an ANativeWindow. for (size_t i = 0; i < mBuffers.size(); i++) { - if (buffer->handle == mBuffers[i]->handle) { + if (mBuffers[i] != 0 && buffer->handle == mBuffers[i]->handle) { idx = mBuffers[i]->getIndex(); break; } |