Fix NPE when Thing configuration changes (#12070)

Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
Kai Kreuzer 2022-01-18 00:03:46 +01:00 committed by GitHub
parent 71b4fcbac7
commit 39ee01687f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -225,7 +225,11 @@ public class TeslaVehicleHandler extends BaseThingHandler {
* @return the vehicle id
*/
public String getVehicleId() {
return vehicle.id;
if (vehicle != null) {
return vehicle.id;
} else {
return null;
}
}
@Override