summaryrefslogtreecommitdiffstats
path: root/libs/gui
diff options
context:
space:
mode:
Diffstat (limited to 'libs/gui')
-rw-r--r--libs/gui/IGraphicBufferProducer.cpp6
-rw-r--r--libs/gui/tests/SurfaceTexture_test.cpp1
2 files changed, 5 insertions, 2 deletions
diff --git a/libs/gui/IGraphicBufferProducer.cpp b/libs/gui/IGraphicBufferProducer.cpp
index fc86e60..0f461e5 100644
--- a/libs/gui/IGraphicBufferProducer.cpp
+++ b/libs/gui/IGraphicBufferProducer.cpp
@@ -60,7 +60,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 {