From 6cdf2cbce617e45e6910c48ef0b2181e422aad79 Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 11 Nov 2005 21:29:35 +0000 Subject: [PATCH] check for CB_ERR return value from CB_GETITEMDATA git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4388 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/LangDLL/LangDLL.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contrib/LangDLL/LangDLL.c b/Contrib/LangDLL/LangDLL.c index ec049fb2..657cdc1b 100644 --- a/Contrib/LangDLL/LangDLL.c +++ b/Contrib/LangDLL/LangDLL.c @@ -80,7 +80,7 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) // push result on the stack i = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETCURSEL, 0, 0); i = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETITEMDATA, i, 0); - if (i) { + if (i != CB_ERR && i) { pushstring((char *) i); } else { // ?!