Fixed CPU_GET_INFO issues spotted by -validate in MESS debug build

This commit is contained in:
Fabio Priuli 2009-04-11 14:06:24 +00:00
parent 3cff704ee3
commit a47d3f01fa
4 changed files with 4 additions and 4 deletions

View File

@ -377,7 +377,7 @@ static CPU_SET_INFO( i80286 )
CPU_GET_INFO( i80286 ) CPU_GET_INFO( i80286 )
{ {
i80286_state *cpustate = (device != NULL) ? get_safe_token(device) : NULL; i80286_state *cpustate = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL;
switch (state) switch (state)
{ {

View File

@ -443,7 +443,7 @@ static CPU_SET_INFO( m4510 )
CPU_GET_INFO( m4510 ) CPU_GET_INFO( m4510 )
{ {
m4510_Regs *cpustate = (device != NULL && device != NULL) ? get_safe_token(device) : NULL; m4510_Regs *cpustate = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL;
switch (state) switch (state)
{ {

View File

@ -324,7 +324,7 @@ static CPU_SET_INFO( m6509 )
CPU_GET_INFO( m6509 ) CPU_GET_INFO( m6509 )
{ {
m6509_Regs *cpustate = (device != NULL && device != NULL) ? get_safe_token(device) : NULL; m6509_Regs *cpustate = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL;
switch (state) switch (state)
{ {

View File

@ -1042,7 +1042,7 @@ static CPU_SET_INFO( nec )
CPU_GET_INFO( v30mz ) CPU_GET_INFO( v30mz )
{ {
v30mz_state *cpustate = (device != NULL && device != NULL) ? get_safe_token(device) : NULL; v30mz_state *cpustate = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL;
int flags; int flags;
switch (state) switch (state)