mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 21:55:10 +00:00
Fix NPE crash
This commit is contained in:
@@ -70,7 +70,11 @@ class PresenterActivity : AppCompatActivity(), SensorEventListener {
|
|||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
plugin = KdeConnect.getInstance().getDevicePlugin(intent.getStringExtra("deviceId"), PresenterPlugin::class.java)!!
|
plugin = KdeConnect.getInstance().getDevicePlugin(intent.getStringExtra("deviceId"), PresenterPlugin::class.java)
|
||||||
|
?: run {
|
||||||
|
finish()
|
||||||
|
return
|
||||||
|
}
|
||||||
setContent { PresenterScreen() }
|
setContent { PresenterScreen() }
|
||||||
createMediaSession()
|
createMediaSession()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user