*Tweaked synchronized blocks

This commit is contained in:
Hellfish
2013-05-04 20:58:14 +00:00
parent 993e6e770b
commit b85587038d

View File

@@ -944,9 +944,8 @@ public class MagicStack extends MyObservable {
synchronized (this.stack) { synchronized (this.stack) {
this.getStack().remove(si); this.getStack().remove(si);
} }
synchronized (this.frozenStack) {
this.getFrozenStack().remove(si); this.getFrozenStack().remove(si);
}
this.updateObservers(); this.updateObservers();
} }
@@ -1110,7 +1109,9 @@ public class MagicStack extends MyObservable {
* @return the stack * @return the stack
*/ */
public final Stack<SpellAbilityStackInstance> getStack() { public final Stack<SpellAbilityStackInstance> getStack() {
return this.stack; synchronized(this.stack) {
return this.stack;
}
} }
/** /**