v0.9.0a: added some null safety checks

This commit is contained in:
Evan Debenham 2020-10-07 21:21:58 -04:00
parent 25a638fc89
commit eb4109e487
3 changed files with 3 additions and 1 deletions

View File

@ -145,6 +145,7 @@ public class Spinner extends Mob {
public int webPos(){
Char enemy = this.enemy;
if (enemy == null) return -1;
Ballistica b;

View File

@ -154,6 +154,7 @@ public class RingOfWealth extends Ring {
private static int latestDropTier = 0;
public static void showFlareForBonusDrop( Visual vis ){
if (vis == null) return;
switch (latestDropTier){
default:
break; //do nothing

View File

@ -71,7 +71,7 @@ public class News {
private static ArrayList<NewsArticle> articles;
public static synchronized boolean articlesAvailable(){
return articles != null;
return articles != null && !articles.isEmpty();
}
public static synchronized ArrayList<NewsArticle> articles(){