Prevent NPE

This can happen on a disconnect event before start
This commit is contained in:
M66B 2019-11-13 14:29:45 +01:00
parent 538043b079
commit c506678433
1 changed files with 4 additions and 2 deletions

View File

@ -678,8 +678,10 @@ public class ServiceSynchronize extends ServiceBase {
private void stop() {
EntityLog.log(this, "Main stop");
state.stop();
state.join();
if (state != null) {
state.stop();
state.join();
}
EntityLog.log(this, "Main stopped");