Fixed a bug that game client tries to send turning mode packet when there is no socketThread

- add a if statement to check if socketThread is initialized before sending packet.

#story[1278]
This commit is contained in:
Haoming Yin
2017-09-23 21:04:57 +12:00
parent 1042817e4e
commit 8dfdb228e9
@@ -461,6 +461,7 @@ public class GameClient {
}
public void sendToggleTurningModePacket() {
if (socketThread != null) {
if (gameKeyBind.isContinuouslyTurning()) {
socketThread.sendBoatAction(BoatAction.CONTINUOUSLY_TURNING);
} else {
@@ -468,3 +469,4 @@ public class GameClient {
}
}
}
}