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

Commit 3bb97913 authored by Valerie Hau's avatar Valerie Hau
Browse files

Check for no error in getting planeLayout in lock

Bug: 153375197
Test: build, boot, libui_test
Change-Id: I47715b31d759367f22ca14598e43b078094d9d75
parent 14f49cd4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ status_t Gralloc4Mapper::lock(buffer_handle_t bufferHandle, uint64_t usage, cons
    std::vector<ui::PlaneLayout> planeLayouts;
    status_t err = getPlaneLayouts(bufferHandle, &planeLayouts);

    if (err != NO_ERROR && !planeLayouts.empty()) {
    if (err == NO_ERROR && !planeLayouts.empty()) {
        if (outBytesPerPixel) {
            int32_t bitsPerPixel = planeLayouts.front().sampleIncrementInBits;
            for (const auto& planeLayout : planeLayouts) {