fixed gtk1 bug #9017 which caused a crash when listviewstyle is vsReport and no columns are added and

clicking on the dummy column

git-svn-id: trunk@12442 -
This commit is contained in:
andrew 2007-10-13 17:04:25 +00:00
parent aad1ee73ad
commit 9a08cb8dc2

View File

@ -61,7 +61,13 @@ function GtkWSCustomListView_ClickColumn(AList: PGTKCList; AColumn: Integer; AIn
var
msg: TLMNotify;
NM: TNMListView;
ALV: TListView;
begin
// this can happen when no columns are added which crashes the program
ALV := TListView(AInfo^.LCLObject);
if AColumn > ALV.Columns.Count-1 then
Exit;
msg.Msg := CN_NOTIFY;
FillChar(NM, SizeOf(NM), 0);