Fixed a crash on startup if no games were found.

This commit is contained in:
Leon Styhre 2022-03-28 17:47:34 +02:00
parent 03c06bc306
commit 7e0df9063c

View file

@ -150,7 +150,7 @@ void SystemView::update(int deltaTime)
void SystemView::render(const glm::mat4& parentTrans)
{
if (mPrimary->getNumEntries() == 0)
if (mPrimary == nullptr)
return; // Nothing to render.
bool fade {false};
@ -355,6 +355,9 @@ void SystemView::onCursorChanged(const CursorState& state)
void SystemView::populate()
{
if (SystemData::sSystemVector.size() == 0)
return;
LOG(LogDebug) << "SystemView::populate(): Populating carousel";
auto themeSets = ThemeData::getThemeSets();