v0.9.0a: added some null safety checks
This commit is contained in:
@@ -145,6 +145,7 @@ public class Spinner extends Mob {
|
||||
|
||||
public int webPos(){
|
||||
|
||||
Char enemy = this.enemy;
|
||||
if (enemy == null) return -1;
|
||||
|
||||
Ballistica b;
|
||||
|
||||
+1
@@ -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
|
||||
|
||||
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user