diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-07-27 20:11:22 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-07-27 20:11:22 +0200 |
commit | dbab43e42388572c19f59339cf0c8a76f85b8b7b (patch) | |
tree | c7cc376e6df6da7017ef1e673b4bfc5bc55e617b /src | |
parent | cf7df84cab3179a4dae40dcc7c9e23701d467338 (diff) |
fixed rare null pointer in avatar creation
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/AvatarService.java | 2 |
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 d77f4da5..45a6fd81 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; |