diff --git a/arch/arm/src/stm32/stm32_i2c.c b/arch/arm/src/stm32/stm32_i2c.c index ce150fd3ae1..06a0c75a5ad 100644 --- a/arch/arm/src/stm32/stm32_i2c.c +++ b/arch/arm/src/stm32/stm32_i2c.c @@ -1399,7 +1399,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) * - or we close down by sending the stop bit */ - if (priv->msgc > 0) + if (priv->msgc > 0 && priv->msgv != NULL) { if (priv->msgv->flags & I2C_M_NORESTART) {