prevent crash on dynamic menu loading upgrades

This commit is contained in:
vbawol 2017-03-05 11:02:00 -06:00
parent 4f5d0baf8d
commit c477b9bf58
3 changed files with 8 additions and 2 deletions

View File

@ -137,7 +137,7 @@ if (_buttonSettings isEqualTo []) then {_selfOrTarget = "self"; call _checkConfi
_entries = count _buttonSettings;
if !(_entries <= 0) then {
[_entries, _buttonSettings] call epoch_dynamicMenuPopulate;
[_entries, _buttonSettings] spawn epoch_dynamicMenuPopulate;
} else {
true call Epoch_dynamicMenuCleanup;
};

View File

@ -15,6 +15,7 @@
//[[[cog import generate_private_arrays ]]]
private ["_cfg","_cleanupVars","_close"];
//[[[end]]]
disableSerialization;
_close = param [0,false,[false]];
_cleanupVars = {
@ -26,7 +27,10 @@ _cleanupVars = {
};
if (_close) then {
(findDisplay 66600) closeDisplay 1;
_display = findDisplay 66600;
if !(isNull _display) then {
_display closeDisplay 1;
};
};
if (uiNamespace getVariable ["rmx_var_dynamicMenuInProgress",false]) then {

View File

@ -20,6 +20,8 @@ params ["_entries","_buttonSettings"];
disableSerialization;
_inProgress = uiNamespace getVariable ["rmx_var_dynamicMenuInProgress", false];
waitUntil{!isNull (findDisplay 66600)};
_display = findDisplay 66600;
if (_inProgress) then {