android:add protection for DoricPanel is null
This commit is contained in:
parent
6080717940
commit
3a9b6c2a85
@ -98,7 +98,7 @@ public class DoricPanelFragment extends Fragment implements IDoricNavigator {
|
|||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
if (!(getActivity() instanceof LifecycleOwner)) {
|
if (!(getActivity() instanceof LifecycleOwner && doricPanel != null)) {
|
||||||
doricPanel.onActivityResume();
|
doricPanel.onActivityResume();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -106,7 +106,7 @@ public class DoricPanelFragment extends Fragment implements IDoricNavigator {
|
|||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
if (!(getActivity() instanceof LifecycleOwner)) {
|
if (!(getActivity() instanceof LifecycleOwner) && doricPanel != null) {
|
||||||
doricPanel.onActivityPause();
|
doricPanel.onActivityPause();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -114,7 +114,8 @@ public class DoricPanelFragment extends Fragment implements IDoricNavigator {
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
if (getActivity() == null || !getActivity().isFinishing() || !(getActivity() instanceof LifecycleOwner)) {
|
if ((getActivity() == null || !getActivity().isFinishing() || !(getActivity() instanceof LifecycleOwner))
|
||||||
|
&& doricPanel != null) {
|
||||||
doricPanel.onActivityDestroy();
|
doricPanel.onActivityDestroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user