Commit c71c6ffe authored by Max Lv's avatar Max Lv

Fix a crash in QuickToggle

parent 439d56d1
...@@ -111,7 +111,8 @@ class ShadowsocksConnection(private val instance: Interface) : ServiceConnection ...@@ -111,7 +111,8 @@ class ShadowsocksConnection(private val instance: Interface) : ServiceConnection
connectionActive = false connectionActive = false
if (instance.listenForDeath) binder?.unlinkToDeath(instance, 0) if (instance.listenForDeath) binder?.unlinkToDeath(instance, 0)
binder = null binder = null
service?.stopListeningForBandwidth(instance.serviceCallback) if (instance.serviceCallback != null)
service?.stopListeningForBandwidth(instance.serviceCallback)
service = null service = null
} }
} }
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