diff --git a/src/emu/cpu/dsp56k/dsp56k.c b/src/emu/cpu/dsp56k/dsp56k.c index 3c028e122f9..01fb0efe43a 100644 --- a/src/emu/cpu/dsp56k/dsp56k.c +++ b/src/emu/cpu/dsp56k/dsp56k.c @@ -273,10 +273,12 @@ INLINE void invalid_instruction(UINT32 op) /*************************************************************************** IRQ HANDLING ***************************************************************************/ +#ifdef UNUSED_FUNCTION static void check_irqs(void) { //logerror("Dsp56k check irqs\n"); } +#endif static void set_irq_line(int irqline, int state) { diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index cbbf2dd04fb..7600af442f2 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -272,12 +272,15 @@ void debug_cpu_init(running_machine *machine) void debug_cpu_flush_traces(running_machine *machine) { int cpunum; - + for (cpunum = 0; cpunum < ARRAY_LENGTH(machine->cpu); cpunum++) if (machine->cpu[cpunum] != NULL) { cpu_debug_data *info = cpu_get_debug_data(machine->cpu[cpunum]); - if (info->trace.file != NULL) + + /* this can be called on exit even when no debugging is enabled, so + make sure the info is valid before proceeding */ + if (info != NULL && info->trace.file != NULL) fflush(info->trace.file); } }