am eba8782a: Add NPE check to getSystemWindowInsets
* commit 'eba8782a1f8412a3510fc78a71b843ef6e89bdbb': Add NPE check to getSystemWindowInsets
This commit is contained in:
@@ -87,7 +87,12 @@ public final class WindowInsets {
|
||||
if (mTempRect == null) {
|
||||
mTempRect = new Rect();
|
||||
}
|
||||
mTempRect.set(mSystemWindowInsets);
|
||||
if (mSystemWindowInsets != null) {
|
||||
mTempRect.set(mSystemWindowInsets);
|
||||
} else {
|
||||
// If there were no system window insets, this is just empty.
|
||||
mTempRect.setEmpty();
|
||||
}
|
||||
return mTempRect;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user