Skip to content

Commit 598cad7

Browse files
jeplerdhalbert
andauthored
Update ports/raspberrypi/common-hal/busio/UART.c
Co-authored-by: Dan Halbert <[email protected]>
1 parent 3e7d28c commit 598cad7

File tree

1 file changed

+3
-0
lines changed
  • ports/raspberrypi/common-hal/busio

1 file changed

+3
-0
lines changed

ports/raspberrypi/common-hal/busio/UART.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ void never_reset_uart(uint8_t num) {
4343
}
4444

4545
static void pin_check(const uint8_t uart, const mcu_pin_obj_t *pin, const uint8_t pin_type) {
46+
if (pin == NULL) {
47+
return;
48+
}
4649
if (!(((pin->number % 4) == pin_type) && ((((pin->number + 4) / 8) % NUM_UARTS) == uart))) {
4750
raise_ValueError_invalid_pins();
4851
}

0 commit comments

Comments
 (0)