SurfaceTexture: fix a NULL ptr dereference.
This change adds a NULL check when searching the slot list in
SurfaceTextureClient for the slot corresponding to a buffer being
queued or canceled.
Bug: 4645023
Change-Id: I806cbc1e34da118ea33a83c4f25ce8193ba1c3ad
diff --git a/include/gui/SurfaceTextureClient.h b/include/gui/SurfaceTextureClient.h
index e7c6e24..6ce44fc 100644
--- a/include/gui/SurfaceTextureClient.h
+++ b/include/gui/SurfaceTextureClient.h
@@ -80,6 +80,7 @@
int setUsage(uint32_t reqUsage);
void freeAllBuffers();
+ int getSlotFromBufferLocked(android_native_buffer_t* buffer) const;
int getConnectedApi() const;