File tree Expand file tree Collapse file tree
source-code/app/src/main/java/org/buildmlearn/toolkit/comprehensiontemplate/fragment Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,9 +117,10 @@ public void onFinish() {
117117
118118 Fragment frag = QuestionFragment .newInstance ();
119119 frag .setArguments (arguments );
120- getActivity ().getSupportFragmentManager ().popBackStack (null , FragmentManager .POP_BACK_STACK_INCLUSIVE );
121-
122- getActivity ().getSupportFragmentManager ().beginTransaction ().replace (((ViewGroup ) getView ().getParent ()).getId (), frag ).addToBackStack (null ).commit ();
120+ if (getActivity ()!=null ) {
121+ getActivity ().getSupportFragmentManager ().popBackStack (null , FragmentManager .POP_BACK_STACK_INCLUSIVE );
122+ getActivity ().getSupportFragmentManager ().beginTransaction ().replace (((ViewGroup ) getView ().getParent ()).getId (), frag ).addToBackStack (null ).commit ();
123+ }
123124 }
124125 }.start ();
125126
You can’t perform that action at this time.
0 commit comments