mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
prevent crash on dynamic menu loading upgrades
This commit is contained in:
parent
4f5d0baf8d
commit
c477b9bf58
@ -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;
|
||||||
};
|
};
|
||||||
|
@ -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 {
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user