summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/m6502/m6502.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/m6502/m6502.cpp')
-rw-r--r--src/devices/cpu/m6502/m6502.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/devices/cpu/m6502/m6502.cpp b/src/devices/cpu/m6502/m6502.cpp
index 5db4186ebd9..3817ab33187 100644
--- a/src/devices/cpu/m6502/m6502.cpp
+++ b/src/devices/cpu/m6502/m6502.cpp
@@ -43,12 +43,14 @@ void m6502_device::device_start()
void m6502_device::init()
{
- space(AS_PROGRAM).cache(mintf->cprogram);
- space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).cache(mintf->csprogram);
- if(space(AS_PROGRAM).addr_width() > 14)
- space(AS_PROGRAM).specific(mintf->program);
- else
- space(AS_PROGRAM).specific(mintf->program14);
+ if(mintf) {
+ space(AS_PROGRAM).cache(mintf->cprogram);
+ space(has_space(AS_OPCODES) ? AS_OPCODES : AS_PROGRAM).cache(mintf->csprogram);
+ if(space(AS_PROGRAM).addr_width() > 14)
+ space(AS_PROGRAM).specific(mintf->program);
+ else
+ space(AS_PROGRAM).specific(mintf->program14);
+ }
sync_w.resolve_safe();