v0.9.1a: added a couple safety checks
This commit is contained in:
parent
6ca2d6bc6b
commit
3ee49b98e4
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user