Skip to content

Commit 7f17263

Browse files
committed
I2C: npe
1 parent b23d5e9 commit 7f17263

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ArduinoCore-Linux/cores/arduino/I2CWrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class I2CWrapper : public HardwareI2C {
8787

8888
HardwareI2C* getI2C() {
8989
HardwareI2C* result = p_i2c;
90-
if (result == nullptr) {
90+
if (result == nullptr && p_source != nullptr) {
9191
result = p_source->getI2C();
9292
}
9393
return result;

0 commit comments

Comments
 (0)