2
0
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:
Albert Vaca Cintora
2025-01-23 11:58:08 +01:00
parent 49d36d57a6
commit 3e2c077674

View File

@@ -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()
} }