v0.9.1a: added a couple safety checks
This commit is contained in:
@@ -1048,7 +1048,7 @@ public class Hero extends Char {
|
||||
|
||||
public void rest( boolean fullRest ) {
|
||||
spendAndNext( TIME_TO_REST );
|
||||
if (!fullRest) {
|
||||
if (!fullRest && sprite != null) {
|
||||
sprite.showStatus( CharSprite.DEFAULT, Messages.get(this, "wait") );
|
||||
}
|
||||
resting = fullRest;
|
||||
|
||||
@@ -269,7 +269,7 @@ public class Toolbar extends Component {
|
||||
if (lastEnabled != (Dungeon.hero.ready && Dungeon.hero.isAlive())) {
|
||||
lastEnabled = (Dungeon.hero.ready && Dungeon.hero.isAlive());
|
||||
|
||||
for (Gizmo tool : members) {
|
||||
for (Gizmo tool : members.toArray(new Gizmo[0])) {
|
||||
if (tool instanceof Tool) {
|
||||
((Tool)tool).enable( lastEnabled );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user