Commit 5a6e45a2 authored by Mygod's avatar Mygod

Fix NullPointerException caused by delay

parent 6d536a90
......@@ -75,7 +75,7 @@ trait BaseService extends Service {
if (isConnected && profile.kcp && kcptunProcess != null) {
restartHanlder.removeCallbacks(null)
restartHanlder.postDelayed(() => kcptunProcess.restart(), 2000)
restartHanlder.postDelayed(() => if (kcptunProcess != null) kcptunProcess.restart(), 2000)
}
}
var networkReceiverRegistered: Boolean = _
......
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