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

Commit fbd1be3c 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

am: 2d7553da

Change-Id: Ic84cc381543de9d450ca0c09e0eb024da8bd959f
parents 67942497 2d7553da
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4487,6 +4487,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,