diff options
author | Mathias Agopian <mathias@google.com> | 2012-08-10 14:36:40 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2012-08-10 14:36:40 -0700 |
commit | 748f3df66f6695681cde44461e2548e6e1dbc1bb (patch) | |
tree | be87c2f6f5f1013313c26a3f88a6e6a5fcdd15fc /services | |
parent | 3165cc21cfea781988407b19bd83292b19f05f55 (diff) | |
download | frameworks_native-748f3df66f6695681cde44461e2548e6e1dbc1bb.zip frameworks_native-748f3df66f6695681cde44461e2548e6e1dbc1bb.tar.gz frameworks_native-748f3df66f6695681cde44461e2548e6e1dbc1bb.tar.bz2 |
avoid crashing when we don't have an h/w composer
should fix the emulator
Bug: 6956162
Change-Id: I38247b59d276b8db078c4dc2caba7d3fb545912c
Diffstat (limited to 'services')
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index 909c30d..49aba52 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -620,7 +620,7 @@ public: * returns an iterator initialized at a given index in the layer list */ HWComposer::LayerListIterator HWComposer::getLayerIterator(int32_t id, size_t index) { // FIXME: handle multiple displays - if (index > hwcNumHwLayers(mHwc, mLists[0])) + if (!mHwc || index > hwcNumHwLayers(mHwc, mLists[0])) return LayerListIterator(); if (hwcHasVersion(mHwc, HWC_DEVICE_API_VERSION_1_0)) { return LayerListIterator(new HWCLayerVersion1(mLists[0]->hwLayers), |