Prevent crash

This commit is contained in:
M66B 2019-08-24 13:02:27 +02:00
parent 4cf5bce2c4
commit bd0853f594
1 changed files with 5 additions and 3 deletions

View File

@ -3195,9 +3195,11 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
fragment.setArguments(nargs);
int res = (pane ? R.id.content_pane : R.id.content_frame);
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.replace(res, fragment).addToBackStack("thread");
fragmentTransaction.commit();
if (getActivity() != null && getActivity().findViewById(res) != null) {
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.replace(res, fragment).addToBackStack("thread");
fragmentTransaction.commit();
}
}
@Override