From e0915ba50629f31f670c9dd1e9c8349dd04692cd Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sat, 13 Feb 2021 23:37:14 +1100 Subject: pt68k4: Coverity 316195, 316197 --- src/mame/drivers/pt68k4.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mame/drivers/pt68k4.cpp b/src/mame/drivers/pt68k4.cpp index c29d2c626e1..f05e48dd4b4 100644 --- a/src/mame/drivers/pt68k4.cpp +++ b/src/mame/drivers/pt68k4.cpp @@ -239,11 +239,13 @@ void pt68k4_state::fdc_select_w(uint8_t data) switch (drive) { case 0: - floppy->ss_w((data & 0x40) ? 1 : 0); + if (floppy) + floppy->ss_w((data & 0x40) ? 1 : 0); break; case 1: - floppy2->ss_w((data & 0x40) ? 1 : 0); + if (floppy2) + floppy2->ss_w((data & 0x40) ? 1 : 0); break; default: -- cgit v1.2.3