summaryrefslogtreecommitdiffstats
path: root/libs/gui/IGraphicBufferAlloc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/gui/IGraphicBufferAlloc.cpp')
-rw-r--r--libs/gui/IGraphicBufferAlloc.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/gui/IGraphicBufferAlloc.cpp b/libs/gui/IGraphicBufferAlloc.cpp
index 09b63a1..3009989 100644
--- a/libs/gui/IGraphicBufferAlloc.cpp
+++ b/libs/gui/IGraphicBufferAlloc.cpp
@@ -59,6 +59,9 @@ public:
if (result == NO_ERROR) {
graphicBuffer = new GraphicBuffer();
result = reply.read(*graphicBuffer);
+ if (result != NO_ERROR) {
+ graphicBuffer.clear();
+ }
// reply.readStrongBinder();
// here we don't even have to read the BufferReference from
// the parcel, it'll die with the parcel.