Fix NPE when Thing configuration changes (#12070)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
parent
71b4fcbac7
commit
39ee01687f
|
@ -225,7 +225,11 @@ public class TeslaVehicleHandler extends BaseThingHandler {
|
||||||
* @return the vehicle id
|
* @return the vehicle id
|
||||||
*/
|
*/
|
||||||
public String getVehicleId() {
|
public String getVehicleId() {
|
||||||
|
if (vehicle != null) {
|
||||||
return vehicle.id;
|
return vehicle.id;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue