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; _entries = count _buttonSettings;
if !(_entries <= 0) then { if !(_entries <= 0) then {
[_entries, _buttonSettings] call epoch_dynamicMenuPopulate; [_entries, _buttonSettings] spawn epoch_dynamicMenuPopulate;
} else { } else {
true call Epoch_dynamicMenuCleanup; true call Epoch_dynamicMenuCleanup;
}; };

View File

@ -15,6 +15,7 @@
//[[[cog import generate_private_arrays ]]] //[[[cog import generate_private_arrays ]]]
private ["_cfg","_cleanupVars","_close"]; private ["_cfg","_cleanupVars","_close"];
//[[[end]]] //[[[end]]]
disableSerialization;
_close = param [0,false,[false]]; _close = param [0,false,[false]];
_cleanupVars = { _cleanupVars = {
@ -26,7 +27,10 @@ _cleanupVars = {
}; };
if (_close) then { 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 { if (uiNamespace getVariable ["rmx_var_dynamicMenuInProgress",false]) then {

View File

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