summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-02-19 19:35:36 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-02-19 19:35:36 +0000
commitd620994c178f39d3f7e2ca7a8aa3a0a112692cfe (patch)
tree5ee42349a74b69bb48363560a0e28bb479e3f9f6 /plugins/NewsAggregator
parent9d5b71ed0de4df2ff140fae3f360919f1130c337 (diff)
crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@12200 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewsAggregator')
-rw-r--r--plugins/NewsAggregator/Src/Options.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp
index f5dd37b9f9..bae5366085 100644
--- a/plugins/NewsAggregator/Src/Options.cpp
+++ b/plugins/NewsAggregator/Src/Options.cpp
@@ -566,8 +566,15 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
case LVN_ITEMCHANGED:
NMLISTVIEW *nmlv = (NMLISTVIEW *)lParam;
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE), TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVE), TRUE);
+ int sel = ListView_GetSelectionMark(hwndList);
+ if (sel == -1) {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVE), FALSE);
+ }
+ else {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVE), TRUE);
+ }
if (((nmlv->uNewState ^ nmlv->uOldState) & LVIS_STATEIMAGEMASK) && !UpdateListFlag)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;