From 3c2887f8c3afc25a8e15fc1895ed2ad5b529712a Mon Sep 17 00:00:00 2001 From: joevt Date: Sat, 11 Nov 2023 01:52:03 -0800 Subject: [PATCH] floppyimg: Add null floppy image converter check. --- devices/floppy/floppyimg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices/floppy/floppyimg.cpp b/devices/floppy/floppyimg.cpp index 4e0d3cf..b0ad02f 100644 --- a/devices/floppy/floppyimg.cpp +++ b/devices/floppy/floppyimg.cpp @@ -311,7 +311,7 @@ FloppyImgConverter* open_floppy_image(std::string& img_path) fconv = new RawFloppyImg(img_path); } - if (fconv->calc_phys_params()) { + if (fconv && fconv->calc_phys_params()) { delete fconv; return nullptr; }