diff --git a/cores/esp32/esp32-hal-uart.c b/cores/esp32/esp32-hal-uart.c index c18b0533..c3f2df37 100644 --- a/cores/esp32/esp32-hal-uart.c +++ b/cores/esp32/esp32-hal-uart.c @@ -269,7 +269,7 @@ void uartWrite(uart_t* uart, uint8_t c) void uartWriteBuf(uart_t* uart, const uint8_t * data, size_t len) { - if(uart == NULL) { + if(uart == NULL || data == NULL || !len) { return; }