Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 748f3df6 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

avoid crashing when we don't have an h/w composer

should fix the emulator

Bug: 6956162
Change-Id: I38247b59d276b8db078c4dc2caba7d3fb545912c
parent 3165cc21
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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),