prevent NPE

This commit is contained in:
Anthony Calosa
2023-05-25 10:17:09 +08:00
parent fc944ce41b
commit 6fc7df840d
2 changed files with 4 additions and 2 deletions

View File

@@ -205,7 +205,8 @@ public abstract class Trigger extends TriggerReplacementBase {
} }
} }
if (saDesc.equals("")) { // in case we haven't found anything better if (saDesc.equals("")) { // in case we haven't found anything better
saDesc = sa.toString(); if (sa != null)
saDesc = sa.toString();
} }
// string might have leading whitespace // string might have leading whitespace
saDesc = saDesc.trim(); saDesc = saDesc.trim();

View File

@@ -1660,7 +1660,8 @@ public class FSkin {
w0 = tempCoords[2]; w0 = tempCoords[2];
h0 = tempCoords[3]; h0 = tempCoords[3];
SkinImage.setImage(s0, bim.getSubimage(x0, y0, w0, h0)); if (bim != null)
SkinImage.setImage(s0, bim.getSubimage(x0, y0, w0, h0));
} }
/** /**