mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 09:21:35 +02:00
SynEdit: Fixed possible crash when PropertyEditor was updated after items where deselected
git-svn-id: trunk@18333 -
This commit is contained in:
parent
a47670f307
commit
8c0f2f5c04
@ -264,8 +264,15 @@ procedure TSynObjectPartListPropertyEditorForm.UpdateButtons;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
if SynObjectPartList = nil then begin
|
||||
AddButton.Enabled := False;
|
||||
DeleteButton.Enabled := False;
|
||||
MoveUpButton.Enabled := False;
|
||||
MoveDownButton.Enabled := False;
|
||||
exit;
|
||||
end;
|
||||
I := SynObjectPartsListBox.ItemIndex;
|
||||
AddButton.Enabled := SynObjectPartList <> nil;
|
||||
AddButton.Enabled := True;
|
||||
DeleteButton.Enabled := I > -1;
|
||||
MoveUpButton.Enabled := I > 0;
|
||||
MoveDownButton.Enabled := (I >= 0) and (I < SynObjectPartList.Count - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user