[miio] avoid NPE when rssi is missing (#10854)

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
Marcel 2021-06-12 12:54:19 +02:00 committed by GitHub
parent fc66615fce
commit 10f5ca8578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,7 @@ public class MiIoInfoApDTO {
}
public Long getRssi() {
if (rssi.isNumber()) {
if (rssi != null && rssi.isNumber()) {
return rssi.getAsLong();
}
return null;