IDE: Prevent total crash when trying to load a non-existent image to IDEimages.

git-svn-id: trunk@32815 -
This commit is contained in:
juha 2011-10-11 08:33:05 +00:00
parent 166844b8e5
commit 252e2b9acc

View File

@ -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;