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

Commit 2d7553da authored by Garfield Tan's avatar Garfield Tan Committed by android-build-merger
Browse files

Merge "Add a null check in case device disappears." into pi-dev

am: 3c6f5390

Change-Id: Ia730890f89d07025340c03211e829996ab20c2e8
parents 223831d2 3c6f5390
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4420,6 +4420,8 @@ status_t SurfaceFlinger::captureScreen(const sp<IBinder>& display, sp<GraphicBuf
    if (CC_UNLIKELY(display == 0)) return BAD_VALUE;

    const sp<const DisplayDevice> device(getDisplayDeviceLocked(display));
    if (CC_UNLIKELY(device == 0)) return BAD_VALUE;

    DisplayRenderArea renderArea(device, sourceCrop, reqHeight, reqWidth, rotation);

    auto traverseLayers = std::bind(std::mem_fn(&SurfaceFlinger::traverseLayersInDisplay), this,