FIX: Crash - configure custom columns (issue #1310)

This commit is contained in:
Alexander Koblov 2023-10-09 18:37:02 +03:00
commit f4c82e3c7a

View file

@ -292,7 +292,7 @@ begin
//4. Load our list of columns set.
FillFileSystemList;
FillColumnsList;
cmbFileSystemChange(cmbFileSystem);
//5. Select the one we currently have in the active panel if possible. User won't be lost and it's the most pertinent thing to do.
if frmMain.ActiveNotebook.ActiveView.ClassNameIs('TColumnsFileView') then
@ -440,7 +440,7 @@ end;
{ TfrmOptionsCustomColumns.cbConfigColumnsChange }
procedure TfrmOptionsCustomColumns.cbConfigColumnsChange(Sender: TObject);
begin
if bColumnConfigLoaded then
if bColumnConfigLoaded and (cbConfigColumns.ItemIndex >= 0) then
begin
ColumnClass.Assign(ColSet.GetColumnSet(PtrInt(cbConfigColumns.Items.Objects[cbConfigColumns.ItemIndex])));
LastLoadedOptionSignature := ComputeCompleteOptionsSignature;