v0.9.0a: added some null safety checks
This commit is contained in:
parent
25a638fc89
commit
eb4109e487
|
@ -145,6 +145,7 @@ public class Spinner extends Mob {
|
||||||
|
|
||||||
public int webPos(){
|
public int webPos(){
|
||||||
|
|
||||||
|
Char enemy = this.enemy;
|
||||||
if (enemy == null) return -1;
|
if (enemy == null) return -1;
|
||||||
|
|
||||||
Ballistica b;
|
Ballistica b;
|
||||||
|
|
|
@ -154,6 +154,7 @@ public class RingOfWealth extends Ring {
|
||||||
private static int latestDropTier = 0;
|
private static int latestDropTier = 0;
|
||||||
|
|
||||||
public static void showFlareForBonusDrop( Visual vis ){
|
public static void showFlareForBonusDrop( Visual vis ){
|
||||||
|
if (vis == null) return;
|
||||||
switch (latestDropTier){
|
switch (latestDropTier){
|
||||||
default:
|
default:
|
||||||
break; //do nothing
|
break; //do nothing
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class News {
|
||||||
private static ArrayList<NewsArticle> articles;
|
private static ArrayList<NewsArticle> articles;
|
||||||
|
|
||||||
public static synchronized boolean articlesAvailable(){
|
public static synchronized boolean articlesAvailable(){
|
||||||
return articles != null;
|
return articles != null && !articles.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static synchronized ArrayList<NewsArticle> articles(){
|
public static synchronized ArrayList<NewsArticle> articles(){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user