mirror of https://github.com/OpenVPN/openvpn-gui
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
parent
fc3d96bd73
commit
bfcf3b4679
2
main.c
2
main.c
|
@ -454,7 +454,7 @@ HandleCopyDataMessage(const COPYDATASTRUCT *copy_data)
|
||||||
ForceForegroundWindow(o.hWnd);
|
ForceForegroundWindow(o.hWnd);
|
||||||
RestartOpenVPN(c);
|
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);
|
ForceForegroundWindow(o.hWnd);
|
||||||
ShowWindow(c->hwndStatus, SW_SHOW);
|
ShowWindow(c->hwndStatus, SW_SHOW);
|
||||||
|
|
Loading…
Reference in New Issue