X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fshared%2FWADEDITOR_dfwad.pas;h=b8de439d9d38cf500f43e36027734eabf283fde0;hb=e0fc0ed3e766f6b2c339586976198bdf1bbea66d;hp=2bbc03a3a031397b198d21cd1793574c6ca9b612;hpb=a05470c9a8028d8355045211f9f4dfb0ab332f9a;p=d2df-editor.git diff --git a/src/shared/WADEDITOR_dfwad.pas b/src/shared/WADEDITOR_dfwad.pas index 2bbc03a..b8de439 100644 --- a/src/shared/WADEDITOR_dfwad.pas +++ b/src/shared/WADEDITOR_dfwad.pas @@ -534,6 +534,7 @@ implementation pData := ptr; Len := size; Result := True; + FLastError := DFWAD_NOERROR; except FreeMem(ptr); raise; @@ -547,6 +548,7 @@ implementation pData := ptr; Len := p.data.usize; Result := True; + FLastError := DFWAD_NOERROR; except FreeMem(ptr); raise; @@ -645,7 +647,7 @@ implementation begin if sec = nil then sec := InsertSectionRAW(''); - if res = nil then + if sec = nil then raise Exception.Create('Failed to create root section'); res := InsertFileInfoS(sec, name, offset, csize, -1, nil); if res = nil then