diff options
author | Steve Kondik <steve@cyngn.com> | 2016-08-03 15:02:31 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-08-03 15:02:31 -0700 |
commit | da998f4845d4a4a783620bdd81d1c2feb9d404d3 (patch) | |
tree | 627378241ba4a274cc0de2c4d387659cff4c8e12 | |
parent | 52b8462635f1e807a88784634161f3b7598e1b7b (diff) | |
download | frameworks_native-da998f4845d4a4a783620bdd81d1c2feb9d404d3.zip frameworks_native-da998f4845d4a4a783620bdd81d1c2feb9d404d3.tar.gz frameworks_native-da998f4845d4a4a783620bdd81d1c2feb9d404d3.tar.bz2 |
surfaceflinger: Unbreak casting and other use cases
* If QCOM WFD isn't in use, we'll get -1 here. Don't try and
dig into the array because we'll get some random memory back.
Change-Id: Ib14642fea760dc0e659473bb183c5e0116622302
-rw-r--r-- | services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp b/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp index 64a67e5..a993405 100644 --- a/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp +++ b/services/surfaceflinger/ExSurfaceFlinger/ExHWComposer.cpp @@ -78,6 +78,10 @@ bool ExHWComposer::isCompositionTypeBlit(const int32_t compType) const { #if defined(QTI_BSP) && defined(SDM_TARGET) uint32_t ExHWComposer::getS3DFlag(int disp) const { + if (disp < 0) { + return 0; + } + const DisplayData& disp_data(mDisplayData[disp]); for (size_t i=0 ; i<disp_data.list->numHwLayers-1; i++) { |