Fix Duplicate Entries in Free Food Ad Campaign

When opening and closing the dropdown box multiple times while attempting to create an ad campaign for free food vouchers, the game would duplicate the available food items in the list each time.

I discovered that it was because the vector wasn't being cleared each time the list was populated it, so an easy fix is to clear it before continuing.
This commit is contained in:
Ririan 2021-05-07 07:53:53 -05:00 committed by GitHub
parent ad1bfe0f49
commit 417e5ae7d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -109,6 +109,7 @@ private:
}
}
ShopItems.clear();
for (auto i = 0; i < EnumValue(ShopItem::Count); i++)
{
if (items[i])