wifi: Don't dereference null pointer
This probably is not hit in practice but better safe than sorry. Reported by cppcheck.
This commit is contained in:
parent
0d43101548
commit
f4f0c50444
|
@ -678,7 +678,7 @@ void WIFI_Reset()
|
||||||
wifiCom = wifiComs[CommonSettings.wifi.mode];
|
wifiCom = wifiComs[CommonSettings.wifi.mode];
|
||||||
if (wifiCom && (wifi_lastmode != CommonSettings.wifi.mode))
|
if (wifiCom && (wifi_lastmode != CommonSettings.wifi.mode))
|
||||||
wifiCom->Init();
|
wifiCom->Init();
|
||||||
else
|
else if (wifiCom)
|
||||||
wifiCom->Reset();
|
wifiCom->Reset();
|
||||||
wifi_lastmode = CommonSettings.wifi.mode;
|
wifi_lastmode = CommonSettings.wifi.mode;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue