Merge "Fix crash when rotating HighPowerDetail dialog"

This commit is contained in:
Treehugger Robot
2016-12-14 05:30:16 +00:00
committed by Gerrit Code Review

View File

@@ -131,7 +131,7 @@ public class HighPowerDetail extends DialogFragment implements OnClickListener,
public void onDismiss(DialogInterface dialog) {
super.onDismiss(dialog);
Fragment target = getTargetFragment();
if (target != null) {
if (target != null && target.getActivity() != null) {
target.onActivityResult(getTargetRequestCode(), 0, null);
}
}