IDE: fixed crash when releasing non existing component palette select button

git-svn-id: trunk@38444 -
This commit is contained in:
mattias 2012-08-31 01:53:32 +00:00
parent 80bac85dcd
commit d602e69411

View File

@ -623,8 +623,10 @@ begin
if PageIndex>=0 then begin
CurPage:=Pages[PageIndex];
CurBtn:=TSpeedButton(CurPage.SelectButton);
CurPage.SelectButton:=nil;
Application.ReleaseComponent(CurBtn);
if CurBtn<>nil then begin
CurPage.SelectButton:=nil;
Application.ReleaseComponent(CurBtn);
end;
Pages[PageIndex].PageComponent:=nil;
end;
if FPageControl.Pages[i]=OldActivePage then