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

Commit e8067a7d authored by Mathias Agopian's avatar Mathias Agopian
Browse files

fix a crasher in surfaceflinger

this would happen if being told to draw before a buffer
was available.

Change-Id: I46d121c73e883078cdbf952063e38b0076f79038
parent 1ad238ab
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -227,8 +227,13 @@ void Layer::setPerFrameData(hwc_layer_t* hwcl) {
    } else {
        hwcl->sourceCrop.left   = 0;
        hwcl->sourceCrop.top    = 0;
        if (buffer != NULL) {
            hwcl->sourceCrop.right  = buffer->width;
            hwcl->sourceCrop.bottom = buffer->height;
        } else {
            hwcl->sourceCrop.right  = mTransformedBounds.width();
            hwcl->sourceCrop.bottom = mTransformedBounds.height();
        }
    }
}