Merge pull request #3182 from ByteHamster/illegalstate-fix

Do not deliver result if view is destroyed
This commit is contained in:
H. Lehmann 2019-05-15 12:07:48 +02:00 committed by GitHub
commit b28134e397
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -62,6 +62,15 @@ public class ChaptersFragment extends ListFragment {
EventBus.getDefault().register(this); EventBus.getDefault().register(this);
} }
@Override
public void onDestroyView() {
super.onDestroyView();
if (disposable != null) {
disposable.dispose();
}
}
@Override @Override
public void onStop() { public void onStop() {
super.onStop(); super.onStop();

View File

@ -115,4 +115,13 @@ public class CoverFragment extends Fragment {
controller.release(); controller.release();
controller = null; controller = null;
} }
@Override
public void onDestroyView() {
super.onDestroyView();
if (disposable != null) {
disposable.dispose();
}
}
} }