RepStr: string;
ActivListObj : TObject;
begin
- ActivListObj := ActiveList;
+ ActivListObj := ActiveList;
if ActivListObj is TBBS then begin
BBS := TBBS(ActivListObj);
ThreadItem := nil;
case GikoForm.ViewType of
- gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
- gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
- gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
- gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
+ gvtAll: if Item.Index >= Board.Count then Exit else
+ ThreadItem := TThreadItem(Board.Items[Item.Index]);
+ gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
+ gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
+ gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
end;
if ThreadItem = nil then Exit;
if FActiveList <> Obj then begin
FActiveList := Obj;
- ListView.Selected := nil;
ListView.Items.Count := 0;
ListView.Items.Clear;
+ ListView.Selected := nil;
// ListView.Columns.Clear;
Caption := CAPTION_NAME;