freshollie / monkeyboard-radio-android

Monkeyboard - FM & DAB/DAB+ radio for android
GNU General Public License v3.0
38 stars 18 forks source link

Null pointer exception on close #28

Closed freshollie closed 3 years ago

freshollie commented 3 years ago

https://github.com/freshollie/monkeyboard-radio-android/blob/696a8804c5dbc578711c132a0823a6f337677de6/app/src/main/java/com/freshollie/monkeyboard/keystoneradio/radio/DeviceConnection.java#L105 is causing a null pointer exception because the interface can be set to null while the read thread is running.

This can be corrected by adding a null check on the interface before use.