Fixed crash in LoopSound when tiki's alias list is NULL

This commit is contained in:
OM 2023-05-21 19:57:45 +02:00
parent 342552c349
commit 3933e63044

View file

@ -5139,7 +5139,7 @@ void ClientGameCommandManager::LoopSound(Event* ev)
// Get the real sound to play
if (current_tiki) {
if (current_tiki && current_tiki->a->alias_list) {
name = cgi.Alias_ListFindRandom((AliasList_t*)current_tiki->a->alias_list,
sound_name.c_str(), &soundAlias);
}
@ -5168,7 +5168,7 @@ void CacheResource(const char* stuff)
{
str real_stuff;
if (!stuff) {
if (!stuff || !stuff[0]) {
return;
}