Commit f19f8d8f authored by Max Lv's avatar Max Lv

Fix a crash when no profile selected

parent adaca76b
...@@ -253,7 +253,13 @@ trait BaseService extends Service { ...@@ -253,7 +253,13 @@ trait BaseService extends Service {
case State.STOPPED | State.IDLE => case State.STOPPED | State.IDLE =>
case _ => return Service.START_NOT_STICKY // ignore request case _ => return Service.START_NOT_STICKY // ignore request
} }
profile = app.currentProfile.orNull profile = app.currentProfile.orNull
if (profile == null) {
stopRunner(stopService = true)
return Service.START_NOT_STICKY
}
profile.name = profile.getName // save original name before it's (possibly) overwritten by IP addresses profile.name = profile.getName // save original name before it's (possibly) overwritten by IP addresses
TrafficMonitor.reset() TrafficMonitor.reset()
......
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