summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator/Src/Options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewsAggregator/Src/Options.cpp')
-rw-r--r--plugins/NewsAggregator/Src/Options.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp
index 7dac335b90..4c2bcd6995 100644
--- a/plugins/NewsAggregator/Src/Options.cpp
+++ b/plugins/NewsAggregator/Src/Options.cpp
@@ -115,12 +115,13 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
TCHAR tszURL[MAX_PATH] = { 0 };
- const TCHAR *tszTitle = NULL;
+ TCHAR *tszTitle = NULL;
if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, _countof(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0)
- tszTitle = CheckFeed(tszURL, hwndDlg);
+ tszTitle = (TCHAR*)CheckFeed(tszURL, hwndDlg);
else
MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK);
SetDlgItemText(hwndDlg, IDC_FEEDTITLE, tszTitle);
+ mir_free(tszTitle);
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), TRUE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Check Feed"));
}
@@ -282,8 +283,9 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, _countof(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0) {
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
- const TCHAR *tszTitle = CheckFeed(tszURL, hwndDlg);
+ TCHAR *tszTitle = (TCHAR*)CheckFeed(tszURL, hwndDlg);
SetDlgItemText(hwndDlg, IDC_FEEDTITLE, tszTitle);
+ mir_free(tszTitle);
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), TRUE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Check Feed"));
}
@@ -437,8 +439,9 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, _countof(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0) {
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
- const TCHAR *tszTitle = CheckFeed(tszURL, hwndDlg);
+ TCHAR *tszTitle = (TCHAR*)CheckFeed(tszURL, hwndDlg);
SetDlgItemText(hwndDlg, IDC_FEEDTITLE, tszTitle);
+ mir_free(tszTitle);
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), TRUE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Check Feed"));
}