Skip to content

Commit

Permalink
fix cgeo#6092 crash when refreshing certain caches
Browse files Browse the repository at this point in the history
Looks like `onNext(bitmap)` was called with a null `bitmap`, which is not allowed.
  • Loading branch information
pstorch committed Nov 6, 2016
1 parent 3ccf5a2 commit 9ad9bfc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main/src/cgeo/geocaching/network/HtmlImage.java
Expand Up @@ -232,7 +232,9 @@ public void run() {
final ImmutablePair<BitmapDrawable, Boolean> loaded = loadFromDisk();
final BitmapDrawable bitmap = loaded.left;
if (loaded.right) {
emitter.onNext(bitmap);
if (bitmap != null) {
emitter.onNext(bitmap);
}
emitter.onComplete();
return;
}
Expand Down

0 comments on commit 9ad9bfc

Please sign in to comment.