From 252e2b9acce049cef4e37dbd281910fe8a689011 Mon Sep 17 00:00:00 2001 From: juha Date: Tue, 11 Oct 2011 08:33:05 +0000 Subject: [PATCH] IDE: Prevent total crash when trying to load a non-existent image to IDEimages. git-svn-id: trunk@32815 - --- ideintf/ideimagesintf.pas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ideintf/ideimagesintf.pas b/ideintf/ideimagesintf.pas index b6ddba6b87..04d25545d0 100644 --- a/ideintf/ideimagesintf.pas +++ b/ideintf/ideimagesintf.pas @@ -169,8 +169,12 @@ begin else Exit; end; - - Result := List.AddLazarusResource(ImageName); + try + Result := List.AddLazarusResource(ImageName); + except + on E: Exception do + DebugLn('While loading IDEImages: ' + e.Message); + end; Names.AddObject(ImageName, TObject(PtrInt(Result))); end;