Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit c586a60

Browse files
committed
Fixed crash when clearing an already empty preset list in the buy menu
1 parent f4d181c commit c586a60

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

CHANGELOG.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1010

1111
- Lua binding for `Box::IntersectsBox(otherBox)`, that returns true if 2 boxes intersect.
1212

13-
- Command line arguments for launching directly into editors using `-editor "EditorName"`.
13+
- Command line arguments for launching directly into editors using `-editor "EditorName"`.
1414
Valid editor names are: `ActorEditor`, `GibEditor`, `SceneEditor`, `AreaEditor` and `AssemblyEditor`.
1515

1616
- Added handling for custom number and string values in INI.
@@ -29,18 +29,19 @@ Valid editor names are: `ActorEditor`, `GibEditor`, `SceneEditor`, `AreaEditor`
2929

3030
- Major cleanup and reformatting in the `System` folder.
3131

32-
- Upgraded to new, modern FMOD audio library. Sounds now play in 3D space, so they pan to the left and right, and attenuate automatically based on the player's viewpoint. ([Issue #72](https://github.com/cortex-command-community/Cortex-Command-Community-Project-Source/issues/72))
32+
- Upgraded to new, modern FMOD audio library. ([Issue #72](https://github.com/cortex-command-community/Cortex-Command-Community-Project-Source/issues/72))
33+
Sounds now play in 3D space, so they pan to the left and right, and attenuate automatically based on the player's viewpoint.
3334

34-
- `Sound`s have been renamed to `SoundContainer`s, and are able to handle multiple sounds playing at once. INI definitions have changed accordingly.
35-
They must be added using `... = SoundContainer`, and individual sounds for them must be added using `AddSound = ContentFile...`
35+
- `Sound`s have been renamed to `SoundContainer`s, and are able to handle multiple sounds playing at once. INI definitions have changed accordingly.
36+
They must be added using `... = SoundContainer`, and individual sounds for them must be added using `AddSound = ContentFile...`.
3637

3738
- Various lua bindings around audio have been upgraded, changed or fixed, giving modders a lot more control over sounds. See documentation for more details.
3839

3940
- Centered the loading splash screen image when `DisableLoadingScreen` is true.
4041

41-
- `Box:WithinBox` lua bindings have been renamed.
42-
`Box:WithinBox` is now `Box:IsWithinBox`.
43-
`Box:WithinBoxX` is now `Box:IsWithinBoxX`.
42+
- `Box:WithinBox` lua bindings have been renamed.
43+
`Box:WithinBox` is now `Box:IsWithinBox`.
44+
`Box:WithinBoxX` is now `Box:IsWithinBoxX`.
4445
`Box:WithinBoxY` is now `Box:IsWithinBoxY`.
4546

4647
- Made `AHuman` show both weapon ammo states when 2 one-handed weapons are equipped.
@@ -55,6 +56,8 @@ They must be added using `... = SoundContainer`, and individual sounds for them
5556

5657
- Fixed `BG Arm` flailing when reloading one-handed weapon, so shields are no longer so useless.
5758

59+
- Fixed crash when clearing an already empty preset list in the buy menu.
60+
5861
### Removed
5962

6063
- Removed all Gorilla Audio and SDL Mixer related code and files.

Menus/BuyMenuGUI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,7 @@ void BuyMenuGUI::Update()
10651065
{
10661066
if (m_pSaveButton->HasFocus())
10671067
SaveCurrentLoadout();
1068-
else if (m_pClearButton->HasFocus())
1068+
else if (m_pClearButton->HasFocus() && m_Loadouts.size() != 0)
10691069
{
10701070
m_Loadouts.pop_back();
10711071
// Update the list of loadout presets so the removal shows up

0 commit comments

Comments
 (0)