Skip to content

Commit

Permalink
UPBGE: Avoid to spawn sound actuator when no sound is loaded
Browse files Browse the repository at this point in the history
This is to avoid a crash reported several times internally.
  • Loading branch information
lordloki committed May 28, 2020
1 parent 8329513 commit 3ba7dcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/gameengine/Ketsji/KX_SoundActuator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ void KX_SoundActuator::ProcessReplica()
SCA_IActuator::ProcessReplica();
#ifdef WITH_AUDASPACE
m_handle = nullptr;
m_sound = AUD_Sound_copy(m_sound);
m_sound = m_sound ? AUD_Sound_copy(m_sound) : nullptr;
#endif // WITH_AUDASPACE
}

Expand Down

0 comments on commit 3ba7dcb

Please sign in to comment.