From d88cc5c4f629e98320bc0abf6bdc1c456405dece Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Fri, 15 Apr 2016 03:55:17 +0200 Subject: [PATCH] avoid to parse invalid package list --- src/ce_libmaneditor.lfm | 4 ++-- src/ce_libmaneditor.pas | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ce_libmaneditor.lfm b/src/ce_libmaneditor.lfm index e2a18a90..512de948 100644 --- a/src/ce_libmaneditor.lfm +++ b/src/ce_libmaneditor.lfm @@ -178,12 +178,12 @@ inherited CELibManEditorWidget: TCELibManEditorWidget item AutoSize = True Caption = 'Alias' - Width = 37 + Width = 629 end item AutoSize = True Caption = 'Library file or folder of sources' - Width = 67 + Width = 172 end item AutoSize = True diff --git a/src/ce_libmaneditor.pas b/src/ce_libmaneditor.pas index 67b3a9b7..879a4f9e 100644 --- a/src/ce_libmaneditor.pas +++ b/src/ce_libmaneditor.pas @@ -250,8 +250,16 @@ var cli: TFPHTTPClient; begin cbb.Items.Clear; - cli := TFPHTTPClient.Create(self); - pge := cli.Get('https://code.dlang.org/'); + cli := TFPHTTPClient.Create(nil); + try + try + pge := cli.Get('https://code.dlang.org/'); + except + pge := ''; + end; + finally + cli.Free; + end; // note, also works with regex \"packages\/[a-zA-Z0-9_-]+\" with TStringRange.create(pge) do while not empty do begin