summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2009-01-12 15:05:46 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2009-01-12 15:05:46 +0000
commit05a2481075f5ffdccc094647563d341745add986 (patch)
tree6fbd82bcd38252e83e71f1ad091eaa55b698c634 /extras
parent47d4ff90c062e0ec003ca19d905c41666c246945 (diff)
downloadfpGUI-05a2481075f5ffdccc094647563d341745add986.tar.xz
* Revents a possible AV in StringGrid mediator.
Diffstat (limited to 'extras')
-rw-r--r--extras/tiopf/gui/tiListMediators.pas6
1 files changed, 5 insertions, 1 deletions
diff --git a/extras/tiopf/gui/tiListMediators.pas b/extras/tiopf/gui/tiListMediators.pas
index f80b18b7..c816a263 100644
--- a/extras/tiopf/gui/tiListMediators.pas
+++ b/extras/tiopf/gui/tiListMediators.pas
@@ -391,13 +391,17 @@ end;
procedure TStringGridMediator.SetSelectedObject(const AValue: TtiObject);
var
i: integer;
+ o: TObject;
begin
for i := 0 to FView.RowCount - 1 do
- if TtiObject(FView.Objects[0, i]) = AValue then
+ begin
+ o := FView.Objects[0, i];
+ if Assigned(o) and (TtiObject(o) = AValue) then
begin
FView.FocusRow := i;
Exit; //==>
end;
+ end; { for }
end;
procedure TStringGridMediator.SetView(const AValue: TfpgStringGrid);