Skip to content

Commit

Permalink
Support cues which have no variation
Browse files Browse the repository at this point in the history
  • Loading branch information
alesliehughes authored Apr 27, 2024
1 parent b662b49 commit 522a349
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/FACT.c
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ uint32_t FACTSoundBank_Prepare(
break;
}
}
if ((*ppCue)->variation->flags == 3)
if ((*ppCue)->variation && (*ppCue)->variation->flags == 3)
{
(*ppCue)->interactive = pSoundBank->parentEngine->variables[
(*ppCue)->variation->variable
Expand Down
4 changes: 2 additions & 2 deletions src/FACT_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ uint8_t FACT_INTERNAL_CreateSound(FACTCue *cue, uint16_t fadeInMS)
/* Sound */
baseSound = cue->sound;
}
else
else if (cue->variation)
{
/* Variation */
if (cue->variation->flags == 3)
Expand Down Expand Up @@ -1662,7 +1662,7 @@ void FACT_INTERNAL_UpdateCue(FACTCue *cue)
FACTSoundInstance *sound;

/* Interactive sound selection */
if (!(cue->data->flags & 0x04) && cue->variation->flags == 3)
if (!(cue->data->flags & 0x04) && cue->variation && cue->variation->flags == 3)
{
/* Interactive */
if (cue->parentBank->parentEngine->variables[cue->variation->variable].accessibility & 0x04)
Expand Down

0 comments on commit 522a349

Please sign in to comment.