summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp b/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp
index a993405..92cc1a7 100644
--- a/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp
+++ b/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp
@@ -82,6 +82,9 @@ uint32_t ExHWComposer::getS3DFlag(int disp) const {
return 0;
}
+ if (!mHwc || uint32_t(disp) >= MAX_HWC_DISPLAYS || !mAllocatedDisplayIDs.hasBit(disp))
+ return 0;
+
const DisplayData& disp_data(mDisplayData[disp]);
for (size_t i=0 ; i<disp_data.list->numHwLayers-1; i++) {