From 4c0f588489bed4dbee22b13e1b18a53b90269f49 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 24 Aug 2017 08:46:13 -0400 Subject: [PATCH] v0.6.1b: fixed concurrent modification exceptions when gettin buffs --- .../com/shatteredpixel/shatteredpixeldungeon/actors/Char.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index 2ee7927ef4..8094c80bfd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -314,8 +314,8 @@ protected void spend( float time ) { super.spend( time / timeScale ); } - public HashSet buffs() { - return buffs; + public synchronized HashSet buffs() { + return new HashSet<>(buffs); } @SuppressWarnings("unchecked")