From 2d7a9454e3316d3aa7bdfc4f6713ae3aa4859208 Mon Sep 17 00:00:00 2001 From: lambdatiger Date: Sat, 24 Aug 2024 21:36:48 -0500 Subject: [PATCH] Make sure it's at least a valid path before we spend time searching --- addons/common/functions/fnc_getVehicleIcon.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/common/functions/fnc_getVehicleIcon.sqf b/addons/common/functions/fnc_getVehicleIcon.sqf index a55417f303..d2eb33ffc5 100644 --- a/addons/common/functions/fnc_getVehicleIcon.sqf +++ b/addons/common/functions/fnc_getVehicleIcon.sqf @@ -35,7 +35,7 @@ if (isNil "_cachedValue") then { if (_vehicleValue != "" && {((toLowerANSI _vehicleValue) find ".paa") > -1}) then { _cachedValue = _vehicleValue; } else { - if (fileExists (_vehicleValue + ".paa")) then { + if (_vehicleValue select [0,1] == "\" && {fileExists (_vehicleValue + ".paa")}) then { _cachedValue = _vehicleValue + ".paa"; } else { _cachedValue = DEFAULT_TEXTURE;