From c8ef85c249880d525103064c2d46bef43073706f Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 10 Nov 2023 22:42:36 +0100 Subject: [PATCH] Stop the initialization of a ZIP or Magneto-Optical drive if its task file structure pointer is NULL. --- src/disk/mo.c | 3 +++ src/disk/zip.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/disk/mo.c b/src/disk/mo.c index ad781a8ac..dda4222ca 100644 --- a/src/disk/mo.c +++ b/src/disk/mo.c @@ -2152,6 +2152,9 @@ mo_hard_reset(void) mo_init(dev); + if (dev->tf == NULL) + continue; + if (strlen(mo_drives[c].image_path)) mo_load(dev, mo_drives[c].image_path); diff --git a/src/disk/zip.c b/src/disk/zip.c index c498383e8..69af18e74 100644 --- a/src/disk/zip.c +++ b/src/disk/zip.c @@ -2391,6 +2391,9 @@ zip_hard_reset(void) zip_init(dev); + if (dev->tf == NULL) + continue; + if (strlen(zip_drives[c].image_path)) zip_load(dev, zip_drives[c].image_path);