fixed rare null pointer in avatar creation

This commit is contained in:
Daniel Gultsch 2016-07-27 20:11:22 +02:00
parent cf7df84cab
commit dbab43e423
1 changed files with 1 additions and 1 deletions

View File

@ -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;