Skip to content

Commit ed6886d

Browse files
fixing bug of missing nullptr check
1 parent 1c58899 commit ed6886d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libraries/lwIpWrapper/src/CNetIf.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,10 @@ CNetIf::CNetIf(NetworkDriver *driver)
293293

294294
int CNetIf::begin(const IPAddress &ip, const IPAddress &nm, const IPAddress &gw) {
295295
CLwipIf::getInstance(); // This call is required in order to setup the network stack
296-
driver->begin();
296+
297+
if(driver != nullptr) {
298+
driver->begin();
299+
}
297300

298301
ip_addr_t _ip = fromArduinoIP(ip);
299302
ip_addr_t _nm = fromArduinoIP(nm);

0 commit comments

Comments
 (0)