diff options
-rw-r--r-- | src/main/java/de/pixart/messenger/services/AvatarService.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/services/AvatarService.java b/src/main/java/de/pixart/messenger/services/AvatarService.java index f38102866..81afa9342 100644 --- a/src/main/java/de/pixart/messenger/services/AvatarService.java +++ b/src/main/java/de/pixart/messenger/services/AvatarService.java @@ -333,7 +333,10 @@ public class AvatarService implements OnAdvancedStreamFeaturesLoaded { return bitmap; } - public void clear(MucOptions options) { + public void clear(final MucOptions options) { + if (options == null) { + return; + } synchronized (this.sizes) { for (Integer size : sizes) { this.mXmppConnectionService.getBitmapCache().remove(key(options, size)); @@ -341,7 +344,7 @@ public class AvatarService implements OnAdvancedStreamFeaturesLoaded { } } - private String key(MucOptions options, int size) { + private String key(final MucOptions options, int size) { synchronized (this.sizes) { if (!this.sizes.contains(size)) { this.sizes.add(size); |