From 6511afa1c249f2fd5d1bb531209ec3e623838ee0 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 12 Mar 2015 07:53:41 -0600 Subject: [PATCH] stm32_i2c: Add missing NULL check. From Juha Niskanen --- arch/arm/src/stm32/stm32_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/stm32/stm32_i2c.c b/arch/arm/src/stm32/stm32_i2c.c index ce150fd3ae..06a0c75a5a 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) {