Skip to content
This repository was archived by the owner on Aug 9, 2020. It is now read-only.

Commit acda3c3

Browse files
author
Victor
committed
added check null fragment on RxActivityResult
1 parent be3379a commit acda3c3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ allprojects {
2323
And add next dependencies in the build.gradle of the module:
2424
```gradle
2525
dependencies {
26-
compile "com.github.VictorAlbertos:RxActivityResult:0.3.1"
26+
compile "com.github.VictorAlbertos:RxActivityResult:0.3.2"
2727
compile "io.reactivex:rxjava:1.1.0"
2828
}
2929
```

rx_activity_result/src/main/java/rx_activity_result/RxActivityResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ private OnResult onResultFragment() {
142142
for (Fragment fragment : fragments) {
143143
if(fragment != null && fragment.isVisible() && fragment.getClass() == clazz) {
144144
return fragment;
145-
} else if (fragment.getChildFragmentManager() != null) {
145+
} else if (fragment != null && fragment.getChildFragmentManager() != null) {
146146
List<Fragment> childFragments = fragment.getChildFragmentManager().getFragments();
147147
return getTargetFragment(childFragments);
148148
}

0 commit comments

Comments
 (0)