[miio] avoid NPE in discovery in case of unexpected response cloud (#11420)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
parent
b893b07329
commit
3eb5e566df
|
@ -12,6 +12,7 @@
|
|||
*/
|
||||
package org.openhab.binding.miio.internal.cloud;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
@ -29,6 +30,9 @@ public class CloudDeviceListDTO {
|
|||
private List<CloudDeviceDTO> cloudDevices = null;
|
||||
|
||||
public List<CloudDeviceDTO> getCloudDevices() {
|
||||
if (cloudDevices == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return cloudDevices;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue