When unloading XRE engine this function can fail with an exception.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1387 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
Joshy
2010-11-28 18:21:53 +00:00
parent c40167afdd
commit b4d5f7b9fd

View File

@ -267,7 +267,11 @@ constructor TIStringImpl.Create(src: WideString);
begin
inherited Create;
if NS_FAILED(NS_StringContainerInit(FContainer)) then
Error(reOutOfMemory);
begin
//Maybe the engine is being unloaded, so just skip error.
//Error(reOutOfMemory);
FillByte(FContainer,sizeof(FContainer),0);
end;
FOwn := True;
FString := @FContainer;
Assign(src);