summaryrefslogtreecommitdiffstats
path: root/libs/gui
diff options
context:
space:
mode:
Diffstat (limited to 'libs/gui')
-rw-r--r--libs/gui/IGraphicBufferProducer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/gui/IGraphicBufferProducer.cpp b/libs/gui/IGraphicBufferProducer.cpp
index e3d2a20..b7625f2 100644
--- a/libs/gui/IGraphicBufferProducer.cpp
+++ b/libs/gui/IGraphicBufferProducer.cpp
@@ -61,7 +61,11 @@ public:
bool nonNull = reply.readInt32();
if (nonNull) {
*buf = new GraphicBuffer();
- reply.read(**buf);
+ result = reply.read(**buf);
+ if(result != NO_ERROR) {
+ (*buf).clear();
+ return result;
+ }
}
result = reply.readInt32();
return result;