aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-07-27 20:11:22 +0200
committerChristian Schneppe <christian@pix-art.de>2016-07-27 21:29:58 +0200
commitbcadc56519068d1a5721569d8fea90fa1f6157a4 (patch)
tree82b1c8dc438f53da1361ce7cbcbc2d6ea2c7ec46 /src/main/java/eu/siacs/conversations
parentdfcdd2d21d801e08ea398ff48a75db1f335decd6 (diff)
fixed rare null pointer in avatar creation
Diffstat (limited to 'src/main/java/eu/siacs/conversations')
-rw-r--r--src/main/java/eu/siacs/conversations/services/AvatarService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/AvatarService.java b/src/main/java/eu/siacs/conversations/services/AvatarService.java
index ea71ff047..be7623463 100644
--- a/src/main/java/eu/siacs/conversations/services/AvatarService.java
+++ b/src/main/java/eu/siacs/conversations/services/AvatarService.java
@@ -298,7 +298,7 @@ public class AvatarService implements OnAdvancedStreamFeaturesLoaded {
}
bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
- final String trimmedName = name.trim();
+ final String trimmedName = name == null ? "" : name.trim();
drawTile(canvas, trimmedName, 0, 0, size, size);
mXmppConnectionService.getBitmapCache().put(KEY, bitmap);
return bitmap;