diff options
| author | 2013-08-13 12:06:31 -0700 | |
|---|---|---|
| committer | 2013-08-13 12:06:31 -0700 | |
| commit | 771ed8d71be8c851991164cd10fcfbf2431df86d (patch) | |
| tree | ce345ce77679e144a5cdd0484b3c8e6b48daa90b /libs/gui/IGraphicBufferProducer.cpp | |
| parent | 6f23562e0c112bc5c6159c745d8af755cc530d77 (diff) | |
| parent | fc43e16a5693bca0edfc82c650fb606971e47138 (diff) | |
am fc43e16a: Merge "Graphics:Add error check when create GraphicBuffer"
* commit 'fc43e16a5693bca0edfc82c650fb606971e47138':
Graphics:Add error check when create GraphicBuffer
Diffstat (limited to 'libs/gui/IGraphicBufferProducer.cpp')
| -rw-r--r-- | libs/gui/IGraphicBufferProducer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/gui/IGraphicBufferProducer.cpp b/libs/gui/IGraphicBufferProducer.cpp index e3d2a20dfd..b7625f2cdc 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; |