From 437db22ab803fe52da886d0ee2952f79db0b1526 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 22 May 2015 23:38:16 -0500 Subject: [PATCH] #1364 - Prevent script error if bad muzzle --- addons/safemode/functions/fnc_lockSafety.sqf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/safemode/functions/fnc_lockSafety.sqf b/addons/safemode/functions/fnc_lockSafety.sqf index 5f8b4b9fbd..59aa9e78e5 100644 --- a/addons/safemode/functions/fnc_lockSafety.sqf +++ b/addons/safemode/functions/fnc_lockSafety.sqf @@ -53,7 +53,9 @@ if (_unit getVariable [QGVAR(actionID), -1] == -1) then { _unit setVariable [QGVAR(actionID), _id]; }; -_unit selectWeapon _muzzle;//_weapon +if ((typeName _muzzle) == (typeName "")) then { + _unit selectWeapon _muzzle;//_weapon +}; // play fire mode selector sound [_unit, _weapon, _muzzle] call FUNC(playChangeFiremodeSound);