fehler wenn fahrzeug null

This commit is contained in:
hydrant
2020-07-29 21:09:04 +02:00
parent 5114700f4d
commit d4770c88ed

View File

@@ -150,6 +150,9 @@ class RageVehicle extends RageEntity implements IVehicle {
private vehicle: VehicleMp; private vehicle: VehicleMp;
constructor(vehicle: VehicleMp) { constructor(vehicle: VehicleMp) {
if (!vehicle) {
throw "Vehicle is null / undefined"
}
super(vehicle); super(vehicle);
this.vehicle = vehicle; this.vehicle = vehicle;
} }