4fb3576 - Add pet and target frames
[wowui.git] / kehys / events.lua
index f7ad732..ff6c4c9 100644 (file)
@@ -91,7 +91,7 @@ addon.Events.UpdateAggro = updateAggro;
 
 local function updateVehicle(frame)
     local shouldTargetVehicle = UnitHasVehicleUI(frame.unit) and
-        UnitTargetsVehicleInRaidUI(frame.unit) and UnitExists(frame.vehicle);
+        UnitTargetsVehicleInRaidUI(frame.unit) and frame.vehicle and UnitExists(frame.vehicle);
     if shouldTargetVehicle then
         if not frame.inVehicle then
             frame.inVehicle = true;