mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Fixed a use-after-free in GameSelectorComponent.
This commit is contained in:
parent
46eec8ead6
commit
c7a4449e36
|
@ -25,6 +25,13 @@ public:
|
|||
mSystem->getRootFolder()->setUpdateListCallback([&]() { mNeedsRefresh = true; });
|
||||
}
|
||||
|
||||
~GameSelectorComponent()
|
||||
{
|
||||
if (std::find(SystemData::sSystemVector.cbegin(), SystemData::sSystemVector.cend(),
|
||||
mSystem) != SystemData::sSystemVector.cend())
|
||||
mSystem->getRootFolder()->setUpdateListCallback(nullptr);
|
||||
}
|
||||
|
||||
enum class GameSelection {
|
||||
RANDOM, // Replace with AllowShortEnumsOnASingleLine: false (clang-format >=11.0).
|
||||
LAST_PLAYED,
|
||||
|
|
Loading…
Reference in a new issue