summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-02-09 12:15:01 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-02-09 12:15:01 +0300
commitaa3f51fd00213fa82a2d7ad092e05319f6a4be90 (patch)
tree1170a941c56d2b6bd19f436c66bdaa75d8710cb7 /src/mir_core
parentab53bb4692c05cff1f1842dbbea887876ef550c5 (diff)
code cleaning
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/Windows/CCtrlCombo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mir_core/src/Windows/CCtrlCombo.cpp b/src/mir_core/src/Windows/CCtrlCombo.cpp
index a25614de49..c6d6294387 100644
--- a/src/mir_core/src/Windows/CCtrlCombo.cpp
+++ b/src/mir_core/src/Windows/CCtrlCombo.cpp
@@ -76,7 +76,8 @@ void CCtrlCombo::OnReset()
LPARAM CCtrlCombo::GetCurData() const
{
- return GetItemData(GetCurSel());
+ int idx = GetCurSel();
+ return (idx == CB_ERR) ? 0 : GetItemData(idx);
}
// selects line with userdata passed