aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-29 23:31:16 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-29 23:31:16 +0200
commit8ee27875c3bd9a3270973575c441a70cacb38bef (patch)
tree1b00abbd600cb909918b7c1be968cc73baa1cadd /src
parentaad570487367903f16ccd971f02d1c8ba5a9e934 (diff)
null check when cleaning avatars for muc
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/services/AvatarService.java7
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);