diff options
author | Osso <mesgnet@yahoo.it> | 2015-05-15 07:51:13 +0200 |
---|---|---|
committer | Osso <mesgnet@yahoo.it> | 2015-05-15 07:51:13 +0200 |
commit | 9ecb89981f5f20d524e293a13512dab45df33c09 (patch) | |
tree | fb6855b554ed1c056301b10abba99b84eaffb9a1 /src/mess/machine/amstrad.c | |
parent | 241f3e61f9a1cfc05418f1ecd749a44d9b36b91f (diff) |
amstrad.c: worked around gx4000 crash (nw)
Diffstat (limited to 'src/mess/machine/amstrad.c')
-rw-r--r-- | src/mess/machine/amstrad.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c index 258ef8c83f2..27c6fe9ab06 100644 --- a/src/mess/machine/amstrad.c +++ b/src/mess/machine/amstrad.c @@ -1658,10 +1658,14 @@ Bit 4 controls the interrupt generation. It can be used to delay interrupts.*/ } /* b3b2 != 0 then change the state of upper or lower rom area and rethink memory */ - if((dataToGateArray & 0x0c) != 0) - m_exp->romen_w(0); // active low - else - m_exp->romen_w(1); + if (m_exp) + { + if((dataToGateArray & 0x0c) != 0) + m_exp->romen_w(0); // active low + else + m_exp->romen_w(1); + } + amstrad_setLowerRom(); amstrad_setUpperRom(); @@ -2385,7 +2389,8 @@ void amstrad_state::amstrad_rethinkMemory() } /* mappings for other expansion devices */ - m_exp->set_mapping(); + if (m_exp) + m_exp->set_mapping(); } |