Merge "Fix NPE in PanelFragment" am: 06cafcd733
Change-Id: Ia08ab086c610de141b4cadd2ae097b596351e46e
This commit is contained in:
@@ -144,8 +144,13 @@ public class PanelFragment extends Fragment {
|
|||||||
|
|
||||||
private void createPanelContent() {
|
private void createPanelContent() {
|
||||||
final FragmentActivity activity = getActivity();
|
final FragmentActivity activity = getActivity();
|
||||||
|
if (activity == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (mLayoutView == null) {
|
if (mLayoutView == null) {
|
||||||
activity.finish();
|
activity.finish();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mPanelSlices = mLayoutView.findViewById(R.id.panel_parent_layout);
|
mPanelSlices = mLayoutView.findViewById(R.id.panel_parent_layout);
|
||||||
@@ -172,6 +177,7 @@ public class PanelFragment extends Fragment {
|
|||||||
|
|
||||||
if (mPanel == null) {
|
if (mPanel == null) {
|
||||||
activity.finish();
|
activity.finish();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mMetricsProvider = FeatureFactory.getFactory(activity).getMetricsFeatureProvider();
|
mMetricsProvider = FeatureFactory.getFactory(activity).getMetricsFeatureProvider();
|
||||||
|
Reference in New Issue
Block a user