mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-01-19 16:57:20 +07:00
Bugfix for NPE thrown by layers -- creating issue #51
This commit is contained in:
parent
e672466200
commit
274e756cce
@ -236,7 +236,7 @@ public class Animation extends BaseDrawable {
|
||||
for (int l = 0; l < cof.getNumLayers(); l++) {
|
||||
COF.Layer cofLayer = cof.getLayer(l);
|
||||
Layer layer = layers[cofLayer.component];
|
||||
if (layer.blendMode == BlendMode.ID) {
|
||||
if (layer != null && layer.blendMode == BlendMode.ID) { // FIXME: may be unnecessary in production
|
||||
layer.setBlendMode(BlendMode.BRIGHTEN, Riiablo.colors.highlight);
|
||||
}
|
||||
}
|
||||
@ -254,7 +254,7 @@ public class Animation extends BaseDrawable {
|
||||
for (int l = 0; l < cof.getNumLayers(); l++) {
|
||||
COF.Layer cofLayer = cof.getLayer(l);
|
||||
Layer layer = layers[cofLayer.component];
|
||||
if (layer.blendMode == BlendMode.BRIGHTEN) {
|
||||
if (layer != null && layer.blendMode == BlendMode.BRIGHTEN) { // FIXME: may be unnecessary in production
|
||||
layer.setBlendMode(BlendMode.ID);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user