mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-19 10:41:55 +00:00
ULTIMA8: Avoid potential null reference
This commit is contained in:
parent
927e7ca3b0
commit
f456e268ec
@ -69,7 +69,8 @@ bool DamageInfo::applyToItem(Item *item, uint16 points) const {
|
||||
if (_sound) {
|
||||
AudioProcess *audio = AudioProcess::get_instance();
|
||||
if (audio) {
|
||||
audio->playSFX(_sound, 0x10, item->getObjId(), 1, true);
|
||||
ObjId objid = item ? item->getObjId() : 0;
|
||||
audio->playSFX(_sound, 0x10, objid, 1, true);
|
||||
}
|
||||
}
|
||||
if (replaceItem()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user