Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed from PVS-Studio #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gyazowin/gyazowin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ BOOL uploadFile(HWND hwnd, LPCTSTR fileName)
HINTERNET hConnection = InternetConnect(hSession,
UPLOAD_SERVER, INTERNET_DEFAULT_HTTP_PORT,
NULL, NULL, INTERNET_SERVICE_HTTP, 0, NULL);
if(NULL == hSession) {
if(NULL == hConnection) {
MessageBox(hwnd, _T("Cannot initiate connection"),
szTitle, MB_ICONERROR | MB_OK);
return FALSE;
Expand All @@ -870,7 +870,7 @@ BOOL uploadFile(HWND hwnd, LPCTSTR fileName)
HINTERNET hRequest = HttpOpenRequest(hConnection,
_T("POST"), UPLOAD_PATH, NULL,
NULL, NULL, INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_RELOAD, NULL);
if(NULL == hSession) {
if(NULL == hRequest) {
MessageBox(hwnd, _T("Cannot compose post request"),
szTitle, MB_ICONERROR | MB_OK);
return FALSE;
Expand Down