File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
android/src/main/java/com/pspdfkit/views Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,9 @@ public void setMenuItemGroupingRule(@NonNull MenuItemGroupingRule groupingRule)
248248 private void setupFragment () {
249249 if (fragmentTag != null && configuration != null && document != null ) {
250250 PdfFragment pdfFragment = (PdfFragment ) fragmentManager .findFragmentByTag (fragmentTag );
251- if (pdfFragment != null && pdfFragment .getArguments ().getInt (ARG_ROOT_ID ) != internalId ) {
251+ if (pdfFragment != null &&
252+ (pdfFragment .getArguments () == null ||
253+ pdfFragment .getArguments ().getInt (ARG_ROOT_ID ) != internalId )) {
252254 // This is an orphaned fragment probably from a reload, get rid of it.
253255 fragmentManager .beginTransaction ()
254256 .remove (pdfFragment )
You can’t perform that action at this time.
0 commit comments