mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Avoid nullptr if Gamelist View uses carousel.
This commit is contained in:
parent
1dcc728291
commit
f7eeabeee0
|
@ -568,6 +568,10 @@ void GamelistBase::populateList(const std::vector<FileData*>& files, FileData* f
|
|||
|
||||
if (files.size() > 0) {
|
||||
for (auto it = files.cbegin(); it != files.cend(); ++it) {
|
||||
|
||||
if (!mFirstGameEntry && (*it)->getType() == GAME)
|
||||
mFirstGameEntry = (*it);
|
||||
|
||||
if (mCarousel != nullptr) {
|
||||
assert(carouselItemType != "");
|
||||
|
||||
|
@ -586,9 +590,6 @@ void GamelistBase::populateList(const std::vector<FileData*>& files, FileData* f
|
|||
std::string indicators {mTextList->getIndicators()};
|
||||
std::string collectionIndicators {mTextList->getCollectionIndicators()};
|
||||
|
||||
if (!mFirstGameEntry && (*it)->getType() == GAME)
|
||||
mFirstGameEntry = (*it);
|
||||
|
||||
// Add a leading tick mark icon to the game name if it's part of the custom
|
||||
// collection currently being edited.
|
||||
if (isEditing && (*it)->getType() == GAME) {
|
||||
|
|
Loading…
Reference in a new issue