v0.7.4c: fixed various rare crash bugs
This commit is contained in:
@@ -217,10 +217,15 @@ public class DriedRose extends Artifact {
|
||||
@Override
|
||||
public String status() {
|
||||
if (ghost == null && ghostID != 0){
|
||||
Actor a = Actor.findById(ghostID);
|
||||
if (a != null){
|
||||
ghost = (GhostHero)a;
|
||||
} else {
|
||||
try {
|
||||
Actor a = Actor.findById(ghostID);
|
||||
if (a != null) {
|
||||
ghost = (GhostHero) a;
|
||||
} else {
|
||||
ghostID = 0;
|
||||
}
|
||||
} catch ( ClassCastException e ){
|
||||
ShatteredPixelDungeon.reportException(e);
|
||||
ghostID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,10 +93,10 @@ public class WndRanking extends WndTabbed {
|
||||
public void update() {
|
||||
super.update();
|
||||
|
||||
if (thread != null && !thread.isAlive()) {
|
||||
thread = null;
|
||||
if (thread != null && !thread.isAlive() && busy != null) {
|
||||
if (error == null) {
|
||||
remove( busy );
|
||||
busy = null;
|
||||
if (Dungeon.hero != null) {
|
||||
createControls();
|
||||
} else {
|
||||
@@ -109,6 +109,12 @@ public class WndRanking extends WndTabbed {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
super.destroy();
|
||||
thread = null;
|
||||
}
|
||||
|
||||
private void createControls() {
|
||||
|
||||
String[] labels =
|
||||
|
||||
Reference in New Issue
Block a user