mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
Merge pull request #315 from dlew/dlew/fix-npe
Fixed accidentally introduced potential NPE
This commit is contained in:
commit
d4c2fc6beb
1 changed files with 3 additions and 4 deletions
|
|
@ -66,10 +66,9 @@ public class UserPicture {
|
|||
Bitmap res = Bitmap.createBitmap(WIDTH, HEIGHT, Bitmap.Config.ARGB_8888);
|
||||
Canvas myCanvas = new Canvas(res);
|
||||
Integer layerNumber = 0;
|
||||
for (Object layer : this.layers) {
|
||||
if (layer.getClass() == Bitmap.class) {
|
||||
Bitmap layerBitmap = (Bitmap) layer;
|
||||
this.modifyCanvas(layerBitmap, myCanvas, layerNumber);
|
||||
for (Bitmap layerBitmap : this.layers) {
|
||||
if (layerBitmap != null) {
|
||||
modifyCanvas(layerBitmap, myCanvas, layerNumber);
|
||||
}
|
||||
layerNumber++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue