Commit 8f72fe47 authored by Nico Mack's avatar Nico Mack

Fixed a bug potentially causing an NPE if a tetherable corona was

removed while tethered.
parent 1ccebe4c
......@@ -217,8 +217,10 @@ public class TetherManager {
if (!currentlyTethered.isEmpty()) {
synchronized (currentlyTethered) {
for (Tetherable tethered : currentlyTethered.keySet()) {
Point tetherEnding = tethered.getTetherOrigin().toScreenCoordinates();
shortest = Math.min(this.distance(tetherOrigin, tetherEnding), shortest);
if (tethered.getTetherOrigin() != null) {
Point tetherEnding = tethered.getTetherOrigin().toScreenCoordinates();
shortest = Math.min(this.distance(tetherOrigin, tetherEnding), shortest);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment