diff options
Diffstat (limited to 'libs/gui')
-rw-r--r-- | libs/gui/IGraphicBufferProducer.cpp | 6 | ||||
-rw-r--r-- | libs/gui/tests/SurfaceTexture_test.cpp | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/libs/gui/IGraphicBufferProducer.cpp b/libs/gui/IGraphicBufferProducer.cpp index 3080220..704fa50 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; diff --git a/libs/gui/tests/SurfaceTexture_test.cpp b/libs/gui/tests/SurfaceTexture_test.cpp index 05b0b67..e4fba15 100644 --- a/libs/gui/tests/SurfaceTexture_test.cpp +++ b/libs/gui/tests/SurfaceTexture_test.cpp @@ -35,7 +35,6 @@ #include <GLES2/gl2ext.h> #include <ui/FramebufferNativeWindow.h> -#include <utils/UniquePtr.h> #include <android/native_window.h> namespace android { |