mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 07:27:15 +01:00
Got a weird crash profiling the slideshow machine
- Seems to be a race condition, try/catch should be good enough
This commit is contained in:
parent
40bdbc7048
commit
4b49763e0c
1 changed files with 7 additions and 3 deletions
|
@ -31,9 +31,13 @@ public class CrafterCTBehaviour extends ConnectedTextureBehaviour {
|
|||
return false;
|
||||
if (input1.data.isEmpty() || input2.data.isEmpty())
|
||||
return false;
|
||||
if (pos.add(input1.data.get(0))
|
||||
.equals(otherPos.add(input2.data.get(0))))
|
||||
return true;
|
||||
try {
|
||||
if (pos.add(input1.data.get(0))
|
||||
.equals(otherPos.add(input2.data.get(0))))
|
||||
return true;
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
// race condition. data somehow becomes empty between the last 2 if statements
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue