From 3f4095530685941465c964753b4ba625ae15ca86 Mon Sep 17 00:00:00 2001 From: tomcw Date: Tue, 30 Aug 2022 21:43:20 +0100 Subject: [PATCH] WOZ: fix obscure crash bug. (Fixes #1126) --- source/Disk.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/Disk.cpp b/source/Disk.cpp index 8969ac21..ae88846f 100644 --- a/source/Disk.cpp +++ b/source/Disk.cpp @@ -1450,6 +1450,12 @@ void Disk2InterfaceCard::DataShiftWriteWOZ(WORD pc, WORD addr, ULONG uExecutedCy return; } + if (!drive.m_spinning) + return; + + if (!floppy.m_trackimagedata) // GH#1126 + return; + #if LOG_DISK_WOZ_SHIFTWRITE LOG_DISK("T$%02X, bitOffset=%04X: %02X (%d bits)\n", drive.m_phase/2, floppy.m_bitOffset, m_shiftReg, bitCellRemainder); #endif