Browse Source

main.c: resolve possible null pointer dereference

found by cppcheck

[main.c:457] -> [main.c:457]: (warning) Either the condition 'copy_data->dwData==(WM_APP+15)&&c->hwndStatus&&c' is redundant or there is possible null pointer dereference: c.
pull/299/head
Ilya Shipitsin 6 years ago committed by Selva Nair
parent
commit
bfcf3b4679
  1. 2
      main.c

2
main.c

@ -454,7 +454,7 @@ HandleCopyDataMessage(const COPYDATASTRUCT *copy_data)
ForceForegroundWindow(o.hWnd);
RestartOpenVPN(c);
}
else if(copy_data->dwData == WM_OVPN_SHOWSTATUS && c->hwndStatus && c)
else if(copy_data->dwData == WM_OVPN_SHOWSTATUS && c && c->hwndStatus)
{
ForceForegroundWindow(o.hWnd);
ShowWindow(c->hwndStatus, SW_SHOW);

Loading…
Cancel
Save