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

Commit 2cee2ea7 authored by Alec Mouri's avatar Alec Mouri
Browse files

Add missing return for invoking screen capture error

...as otherwise we try to capture a screenshot with invalid display parameters after reporting an error to the client, which is undefined behavior.

Bug: 420737122
Flag: EXEMPT bug fix
Test: courage
Change-Id: I53b40a857152d864e4f28abecfc8e7745156857c
parent e56409f2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7734,6 +7734,7 @@ void SurfaceFlinger::captureScreenCommon(ScreenshotArgs& args, ui::PixelFormat r
    status_t status = setScreenshotSnapshotsAndDisplayState(args);
    if (status != OK) {
        invokeScreenCaptureError(status, captureListener);
        return;
    }

    if (exceedsMaxRenderTargetSize(args.size.getWidth(), args.size.getHeight())) {