fixed crash on end of package tree

git-svn-id: trunk@6721 -
This commit is contained in:
mattias 2005-02-01 11:25:16 +00:00
parent 7bebf194eb
commit dc731a2447
2 changed files with 8 additions and 3 deletions

View File

@ -1607,6 +1607,7 @@ begin
if CollectValues then FetchValues;
if ((FEditor<>nil) or OldEditorExisted) and Assigned(OnEditorChanged) then
OnEditorChanged(Self);
UpdateIdleHandler;
end;
procedure TCustomPropertyLink.FetchValues;
@ -1634,6 +1635,7 @@ begin
FIdleHandlerConnected:=false;
Application.RemoveOnIdleHandler(@OnApplicationIdle);
end;
//debugln('TCustomPropertyLink.UpdateIdleHandler ploReadOnIdle=',dbgs(ploReadOnIdle in Options));
end;
end;
@ -2103,10 +2105,10 @@ end;
procedure TTICustomEdit.LinkLoadFromProperty(Sender: TObject);
begin
if Sender=nil then ;
if (FLink.Editor=nil) then exit;
//writeln('TTICustomEdit.LinkLoadFromProperty A ',Name,
// ' FLink.GetAsText=',FLink.GetAsText,' Text=',Text,
// ' PropName=',FLink.TIPropertyName);
if (FLink.Editor=nil) then exit;
Text:=FLink.GetAsText;
end;
@ -2114,6 +2116,9 @@ procedure TTICustomEdit.LinkSaveToProperty(Sender: TObject);
begin
if Sender=nil then ;
if FLink.Editor=nil then exit;
//writeln('TTICustomEdit.LinkSaveToProperty A ',Name,
// ' FLink.GetAsText=',FLink.GetAsText,' Text=',Text,
// ' PropName=',FLink.TIPropertyName);
FLink.SetAsText(Text);
end;

View File

@ -664,8 +664,8 @@ begin
break;
end;
CurNode:=LinkTree.FindSuccessor(CurNode);
if AnsiCompareText(TPackageLink(CurNode.Data).Name,Dependency.PackageName)
<>0
if CurNode=nil then break;
if CompareText(TPackageLink(CurNode.Data).Name,Dependency.PackageName)<>0
then begin
CurNode:=nil;
break;