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

Commit 5f48dc74 authored by Michael Wright's avatar Michael Wright
Browse files

Only call dump when a ViewRoot actually exists

Bug: 11446494
Change-Id: I47e35d7b4d49d6893ba0c9f8ad05b31f91be85d2
parent c779c01e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -4857,7 +4857,11 @@ public class Activity extends ContextThemeWrapper

        mFragments.dump(prefix, fd, writer, args);

        getWindow().getDecorView().getViewRootImpl().dump(prefix, fd, writer, args);
        if (getWindow() != null &&
                getWindow().peekDecorView() != null &&
                getWindow().peekDecorView().getViewRootImpl() != null) {
            getWindow().peekDecorView().getViewRootImpl().dump(prefix, fd, writer, args);
        }

        mHandler.getLooper().dump(new PrintWriterPrinter(writer), prefix);
    }