From db29443b991a9c8050e9718f6b83fec4d9003e30 Mon Sep 17 00:00:00 2001 From: micha Date: Mon, 15 Dec 2003 22:04:05 +0000 Subject: [PATCH] nil check git-svn-id: trunk@4889 - --- lcl/interfaces/win32/win32listsl.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lcl/interfaces/win32/win32listsl.inc b/lcl/interfaces/win32/win32listsl.inc index 9286f7540b..7861eccfa6 100644 --- a/lcl/interfaces/win32/win32listsl.inc +++ b/lcl/interfaces/win32/win32listsl.inc @@ -277,8 +277,14 @@ End; { TWin32CheckListBoxStrings } function TWin32CheckListBoxStrings.GetChecked(const Index: Integer): Boolean; +var + Data: PWin32CheckListBoxItemRecord; begin - Result:= GetItemRecord(Index, false)^.Checked; + Data := GetItemRecord(Index, false); + if Data <> nil then + Result := Data^.Checked + else + Result := false; end; procedure TWin32CheckListBoxStrings.SetChecked(const Index: Integer; @@ -521,6 +527,9 @@ End; { ============================================================================= $Log$ + Revision 1.24 2003/12/15 22:04:05 micha + nil check + Revision 1.23 2003/12/15 21:57:16 micha checklistbox, implement object+checked; from vincent