snes_snd.c and mos6560.c assert fix (proper way this time) (no whatsnew) [Miodrag Milanovic]

This commit is contained in:
Miodrag Milanovic 2010-04-16 08:58:28 +00:00
parent cb8e95bd9f
commit d8383fc2ce
2 changed files with 7 additions and 3 deletions

View File

@ -125,6 +125,7 @@ INLINE mos6560_state *get_safe_token( running_device *device )
assert(device != NULL);
assert(device->token != NULL);
assert(device->type == SOUND);
assert(sound_get_type(device) == MOS656X);
return (mos6560_state *)device->token;
}
@ -132,7 +133,9 @@ INLINE mos6560_state *get_safe_token( running_device *device )
INLINE const mos6560_interface *get_interface( running_device *device )
{
assert(device != NULL);
assert((device->type == SOUND));
assert(device->type == SOUND);
assert(sound_get_type(device) == MOS656X);
return (const mos6560_interface *) device->baseconfig().static_config;
}

View File

@ -234,8 +234,9 @@ struct _snes_sound_state
INLINE snes_sound_state *get_safe_token( running_device *device )
{
assert(device != NULL);
assert(device->token != NULL);
assert(device->type == SNES_SPC);
assert(device->token != NULL);
assert(device->type == SOUND);
assert(sound_get_type(device) == SNES_SPC);
return (snes_sound_state *)device->token;
}