summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-04-29 21:54:11 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-04-29 21:54:11 +0300
commitd33fbf640abf306b8b511ab493ec14497f48c13b (patch)
tree7a64e51bd4b9dadafcc02f10282eac7f80f11c9c /src
parent2ad8065a86c821afade51c45c49b5127b0e6c117 (diff)
if error returned, CCtrlListView::GetItem shall also return error
Diffstat (limited to 'src')
-rw-r--r--src/mir_core/src/CCtrlListView.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mir_core/src/CCtrlListView.cpp b/src/mir_core/src/CCtrlListView.cpp
index 9573cc0b02..b41aa8e085 100644
--- a/src/mir_core/src/CCtrlListView.cpp
+++ b/src/mir_core/src/CCtrlListView.cpp
@@ -145,8 +145,7 @@ LPARAM CCtrlListView::GetItemData(int iItem) const
LVITEM lvi = { 0 };
lvi.mask = LVIF_PARAM;
lvi.iItem = iItem;
- GetItem(&lvi);
- return lvi.lParam;
+ return GetItem(&lvi) ? lvi.lParam : -1;
}
void CCtrlListView::GetCaretPos(CContextMenuPos &pos) const