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:
riccardom 2011-10-02 08:12:35 +00:00
parent 0d43101548
commit f4f0c50444
1 changed files with 1 additions and 1 deletions

View File

@ -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;