mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-25 15:32:52 +00:00
Prevent crash
This commit is contained in:
parent
96a94a6c94
commit
3114889282
1 changed files with 3 additions and 1 deletions
|
@ -148,7 +148,9 @@ public class FragmentDialogBase extends DialogFragment {
|
|||
once = true;
|
||||
Fragment target = getTargetFragment();
|
||||
Log.i("Dialog target=" + target + " result=" + result);
|
||||
if (target != null) {
|
||||
if (target != null &&
|
||||
target.getView() != null &&
|
||||
target.getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) {
|
||||
Intent data = new Intent();
|
||||
data.putExtra("args", getArguments());
|
||||
target.onActivityResult(getTargetRequestCode(), result, data);
|
||||
|
|
Loading…
Reference in a new issue