summaryrefslogtreecommitdiff
path: root/protocols/WebView/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-07-24 14:30:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-07-24 14:30:13 +0300
commit103de9c164934b2393dfcba7011625f90c8a2097 (patch)
treef7a4a09afe29398f3b7605d7d0db264638a18150 /protocols/WebView/src
parent541eab20530165d10592a9fda590f435c6a8b4be (diff)
NLHR_PTR - smart pointers make better code
Diffstat (limited to 'protocols/WebView/src')
-rw-r--r--protocols/WebView/src/webview_getdata.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/protocols/WebView/src/webview_getdata.cpp b/protocols/WebView/src/webview_getdata.cpp
index 155f1be6c9..ab21c3f3ce 100644
--- a/protocols/WebView/src/webview_getdata.cpp
+++ b/protocols/WebView/src/webview_getdata.cpp
@@ -134,7 +134,7 @@ void GetData(void *param)
db_set_ws(hContact, "CList", "StatusMsg", TranslateT("Updating..."));
g_plugin.setWord(hContact, "Status", ID_STATUS_DND); // download
- NETLIBHTTPREQUEST *nlhrReply = Netlib_HttpTransaction(hNetlibUser, &nlhr);
+ NLHR_PTR nlhrReply(Netlib_HttpTransaction(hNetlibUser, &nlhr));
if (nlhrReply) {
if (nlhrReply->resultCode < 200 || nlhrReply->resultCode >= 300) {
g_plugin.setWord(hContact, "Status", ID_STATUS_AWAY);
@@ -169,8 +169,6 @@ void GetData(void *param)
else if (nlhrReply)
DownloadSuccess = 1;
- Netlib_FreeHttpRequest(nlhrReply);
-
if (DownloadSuccess)
SetDlgItemText(hwndDlg, IDC_STATUSBAR, TranslateT("Download successful; about to process data..."));