From ebbf2b373a9a474459fed3dc384e494e1ce572fc Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 17 Nov 2015 23:44:50 -0600 Subject: [PATCH] goggles - prevent CBA PFEH warning fix "x\cba\addons\common\fnc_removePerFrameHandler.sqf:30","WARNING: Invalid or not existing PFH ID." --- addons/goggles/functions/fnc_handleKilled.sqf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/goggles/functions/fnc_handleKilled.sqf b/addons/goggles/functions/fnc_handleKilled.sqf index d156fb684c..e8e207c478 100644 --- a/addons/goggles/functions/fnc_handleKilled.sqf +++ b/addons/goggles/functions/fnc_handleKilled.sqf @@ -26,7 +26,9 @@ GVAR(EffectsActive) = false; _unit setVariable ["ACE_EyesDamaged", false]; -[GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler; +if (GVAR(DustHandler) != -1) then { + [GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler; +}; GVAR(DustHandler) = -1; true