From c20f4e18cbfd089aad3d1d2e4444cd206fe1c7b8 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Thu, 16 Jun 2022 12:10:01 +0000 Subject: [PATCH] ScrollText: Remove "resource not found" exception which is very annoying at designtime. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8309 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/scrolltext/latest_stable/scrollingtext.pas | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/scrolltext/latest_stable/scrollingtext.pas b/components/scrolltext/latest_stable/scrollingtext.pas index 3fbc9f7ce..4bc77b941 100644 --- a/components/scrolltext/latest_stable/scrollingtext.pas +++ b/components/scrolltext/latest_stable/scrollingtext.pas @@ -174,6 +174,7 @@ begin Brush.Style := bsSolid; FillRect(0, 0, Width, Height); end; + if (fTextSource = stTextfile) then if FileExists('scrolling.txt') then begin @@ -204,9 +205,7 @@ begin begin // Finally, test of a .lrs resource r := LazarusResources.Find(fResourceName); - if r = nil then - raise Exception.CreateFmt('Resource ''%s'' is missing',[fResourceName]) - else + if r <> nil then begin fLines.Clear; fLines.Add(r.Value);