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

Commit eba8782a authored by Justin Koh's avatar Justin Koh
Browse files

Add NPE check to getSystemWindowInsets

Bug: 15452706
Change-Id: Ica83593eadd0155e1370dba268a9f15ad0affa7d
parent a5de8479
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -87,7 +87,12 @@ public final class WindowInsets {
        if (mTempRect == null) {
            mTempRect = new Rect();
        }
        if (mSystemWindowInsets != null) {
            mTempRect.set(mSystemWindowInsets);
        } else {
            // If there were no system window insets, this is just empty.
            mTempRect.setEmpty();
        }
        return mTempRect;
    }