diff --git a/src/platforms/hosted/ftdi_bmp.c b/src/platforms/hosted/ftdi_bmp.c index f78ab4c..7ff6485 100644 --- a/src/platforms/hosted/ftdi_bmp.c +++ b/src/platforms/hosted/ftdi_bmp.c @@ -455,6 +455,8 @@ bool libftdi_srst_get_val(void) void libftdi_buffer_flush(void) { + if (!bufptr) + return; DEBUG_WIRE("Flush\n"); #if defined(USE_USB_VERSION_BIT) static struct ftdi_transfer_control *tc_write = NULL;