Fix crash when no profile is selected

This commit is contained in:
Mygod
2017-12-17 05:53:35 -08:00
parent b25e9a0905
commit f381ad6300
4 changed files with 10 additions and 9 deletions
@@ -76,8 +76,8 @@ class VpnService : BaseVpnService(), LocalDnsService.Interface {
}
override val tag: String get() = "ShadowsocksVpnService"
override fun createNotification(): ServiceNotification =
ServiceNotification(this, data.profile!!.formattedName, "service-vpn")
override fun createNotification(profileName: String): ServiceNotification =
ServiceNotification(this, profileName, "service-vpn")
private var conn: ParcelFileDescriptor? = null
private var worker: ProtectWorker? = null