Add some nullptr handling

This commit is contained in:
Crash Cringle
2025-03-03 23:25:32 -08:00
committed by teejusb
parent ac767b3ce8
commit 53a26f2fa4
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -581,6 +581,11 @@ bool SongManager::IsGroupNeverCached(const RString& group) const
RString SongManager::GetSongGroupBannerPath( RString sSongGroup ) const
{
Group* group = GetGroupFromName(sSongGroup);
if(group == nullptr)
{
ASSERT_M( 0, ssprintf("requested banner for song group '%s' that doesn't exist",sSongGroup.c_str()) );
return RString();
}
return group->GetBannerPath();
}
/*
@@ -613,6 +618,7 @@ bool SongManager::HasPackIni(RString sSongGroup) const
{
return group->HasPackIni();
}
ASSERT_M( 0, ssprintf("requested pack.ini for song group '%s' that doesn't exist",sSongGroup.c_str()) );
return false;
}