From e8323985c0f5c951a226b77596886190bb079fd4 Mon Sep 17 00:00:00 2001 From: donho Date: Thu, 17 Jan 2008 23:43:48 +0000 Subject: [PATCH] [BUG_FIXED] Fix Preference crash bug. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@109 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/WinControls/Preference/preferenceDlg.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index a01508fa3..413c5cdc7 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -823,6 +823,9 @@ BOOL CALLBACK LangMenuDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPara pDestLst = &_langList; } size_t iRemove = ::SendDlgItemMessage(_hSelf, list2Remove, LB_GETCURSEL, 0, 0); + if (iRemove == -1) + return TRUE; + char s[32]; ::SendDlgItemMessage(_hSelf, list2Remove, LB_GETTEXT, iRemove, (LPARAM)s);