We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4758377 commit f60a914Copy full SHA for f60a914
components/driver/i2c.c
@@ -1342,7 +1342,9 @@ static void IRAM_ATTR i2c_master_cmd_begin_static(i2c_port_t i2c_num)
1342
p_i2c->cmd_idx = 0;
1343
if (i2c_cmd_is_single_byte(cmd) || cmd->total_bytes == cmd->bytes_used) {
1344
p_i2c->cmd_link.head = p_i2c->cmd_link.head->next;
1345
- p_i2c->cmd_link.head->cmd.bytes_used = 0;
+ if(p_i2c->cmd_link.head) {
1346
+ p_i2c->cmd_link.head->cmd.bytes_used = 0;
1347
+ }
1348
}
1349
p_i2c->status = I2C_STATUS_WRITE;
1350
break;
0 commit comments