diff --git a/README.md b/README.md index 6d777ed..bac8155 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ allprojects { And add next dependencies in the build.gradle of the module: ```gradle dependencies { - compile "com.github.VictorAlbertos:RxActivityResult:0.3.1" + compile "com.github.VictorAlbertos:RxActivityResult:0.3.2" compile "io.reactivex:rxjava:1.1.0" } ``` diff --git a/rx_activity_result/src/main/java/rx_activity_result/RxActivityResult.java b/rx_activity_result/src/main/java/rx_activity_result/RxActivityResult.java index 73b069a..f7f6768 100644 --- a/rx_activity_result/src/main/java/rx_activity_result/RxActivityResult.java +++ b/rx_activity_result/src/main/java/rx_activity_result/RxActivityResult.java @@ -142,7 +142,7 @@ private OnResult onResultFragment() { for (Fragment fragment : fragments) { if(fragment != null && fragment.isVisible() && fragment.getClass() == clazz) { return fragment; - } else if (fragment.getChildFragmentManager() != null) { + } else if (fragment != null && fragment.getChildFragmentManager() != null) { List childFragments = fragment.getChildFragmentManager().getFragments(); return getTargetFragment(childFragments); }