FIX: Crash with invalid file view type (fixes #1231)

(cherry picked from commit e9172af6ee)
This commit is contained in:
Alexander Koblov 2023-08-18 21:22:08 +03:00
commit 62bc2c83d2

View file

@ -4992,8 +4992,10 @@ begin
Result := TBriefFileView.Create(Page, AConfig, ANode, FileViewFlags)
else if sType = 'thumbnails' then
Result := TThumbFileView.Create(Page, AConfig, ANode, FileViewFlags)
else
raise Exception.Create('Invalid file view type');
else begin
DCDebug(rsMsgLogError + 'Invalid file view type "%s"', [sType]);
Result := TColumnsFileView.Create(Page, AConfig, ANode, FileViewFlags);
end;
end;
procedure TfrmMain.AssignEvents(AFileView: TFileView);