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

Commit dd5986e0 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix NPE in TaskSnapshotController

Test: Pray
Change-Id: Ie65f072b35fbf1a9a65caf5be48dabbb7abb6be8
Fixes: 36592724
parent 3f1febbe
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -162,12 +162,15 @@ class TaskSnapshotController {
        if (top == null) {
            return null;
        }
        final WindowState mainWindow = top.findMainWindow();
        if (mainWindow == null) {
            return null;
        }
        final GraphicBuffer buffer = top.mDisplayContent.screenshotApplicationsToBuffer(top.token,
                -1, -1, false, 1.0f, false, true);
        if (buffer == null) {
            return null;
        }
        final WindowState mainWindow = top.findMainWindow();
        return new TaskSnapshot(buffer, top.getConfiguration().orientation,
                minRect(mainWindow.mContentInsets, mainWindow.mStableInsets), false /* reduced */,
                1f /* scale */);