From 8c370fb04f75fb98671cb5452c816036a15f271c Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 12 Aug 2018 07:47:03 +0200 Subject: [PATCH] The 86F stop function now makes sure the 86F struct pointer is non-NULL before attempting to put into idle state. --- src/floppy/fdd_86f.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/floppy/fdd_86f.c b/src/floppy/fdd_86f.c index 60df4620e..bc8aa2939 100644 --- a/src/floppy/fdd_86f.c +++ b/src/floppy/fdd_86f.c @@ -10,7 +10,7 @@ * data in the form of FM/MFM-encoded transitions) which also * forms the core of the emulator's floppy disk emulation. * - * Version: @(#)fdd_86f.c 1.0.10 2018/06/12 + * Version: @(#)fdd_86f.c 1.0.11 2018/08/12 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -3111,7 +3111,8 @@ d86f_stop(int drive) { d86f_t *dev = d86f[drive]; - dev->state = STATE_IDLE; + if (dev) + dev->state = STATE_IDLE; }