aboutsummaryrefslogtreecommitdiff
path: root/hw/dma.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-21 23:33:12 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-21 23:33:12 +0000
commitc68ea7043f2ed4c631d1e3a4f35afe247d5ca063 (patch)
tree64b42bfd3fe62caf019e384cee26e80b98da831d /hw/dma.c
parent173d6cfe5129301a3a8f2570223aaa47a815f343 (diff)
downloadqemu-c68ea7043f2ed4c631d1e3a4f35afe247d5ca063.zip
qemu-c68ea7043f2ed4c631d1e3a4f35afe247d5ca063.tar.gz
qemu-c68ea7043f2ed4c631d1e3a4f35afe247d5ca063.tar.bz2
cpu_single_env usage fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1644 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/dma.c')
-rw-r--r--hw/dma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/dma.c b/hw/dma.c
index ce82869..ea13eae 100644
--- a/hw/dma.c
+++ b/hw/dma.c
@@ -427,7 +427,9 @@ int DMA_write_memory (int nchan, void *buf, int pos, int len)
/* request the emulator to transfer a new DMA memory block ASAP */
void DMA_schedule(int nchan)
{
- cpu_interrupt(cpu_single_env, CPU_INTERRUPT_EXIT);
+ CPUState *env = cpu_single_env;
+ if (env)
+ cpu_interrupt(env, CPU_INTERRUPT_EXIT);
}
static void dma_reset(void *opaque)