summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 1842949..f31bae4 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1559,7 +1559,11 @@ void SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& hw, const
const bool hasGlesComposition = hwc.hasGlesComposition(id) || (cur==end);
if (hasGlesComposition) {
- DisplayDevice::makeCurrent(mEGLDisplay, hw, mEGLContext);
+ if (!DisplayDevice::makeCurrent(mEGLDisplay, hw, mEGLContext)) {
+ ALOGW("DisplayDevice::makeCurrent failed. Aborting surface composition for display %s",
+ hw->getDisplayName().string());
+ return;
+ }
// set the frame buffer
glMatrixMode(GL_MODELVIEW);