hilvarenbeek / nl.marcovandenhout.marantz

Marantz driver for Homey
MIT License
8 stars 7 forks source link

Bug: Set_volume doesn't properly null check #26

Open hilvarenbeek opened 5 years ago

hilvarenbeek commented 5 years ago

Got crash report while trying to set volume in a flow on the Android app:

A crash occurred for your app (version 1.0.4) at Apr 24, 2019 6:42 PM (UTC).

Homey software version: 2.1.1

Crash report: /drivers/DMamplifier/device.js:640 var asciiVolume = "0" + targetVolume.toString(); ^

TypeError: Cannot read property 'toString' of null at DMDevice.setVolume (/drivers/DMamplifier/device.js:640:46) at DMDevice.onActionSetVolume (/drivers/DMamplifier/device.js:474:16) [...]

Looks like a null check/invalid input check is missing or not working correctly.