Skip to content

Commit 3e78c34

Browse files
author
维术
committed
[Exposed-core]: fix NPE caused by LoadingView.
1 parent d441a8b commit 3e78c34

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

VirtualApp/app/src/main/java/io/virtualapp/home/LoadingActivity.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,16 @@ public void onAppOpened(String packageName, int userId) throws RemoteException {
8484
@Override
8585
protected void onResume() {
8686
super.onResume();
87-
loadingView.startAnim();
87+
if (loadingView != null) {
88+
loadingView.startAnim();
89+
}
8890
}
8991

9092
@Override
9193
protected void onPause() {
9294
super.onPause();
93-
loadingView.stopAnim();
95+
if (loadingView != null) {
96+
loadingView.stopAnim();
97+
}
9498
}
9599
}

0 commit comments

Comments
 (0)