From: DeaDDooMER Date: Fri, 29 Sep 2023 11:38:25 +0000 (+0300) Subject: dfwad: fix use before assignment X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-editor.git;a=commitdiff_plain;h=d8d64dd9e4ca2f0fbedce9735a22b0ed5f8ebd53 dfwad: fix use before assignment --- diff --git a/src/shared/WADEDITOR_dfwad.pas b/src/shared/WADEDITOR_dfwad.pas index 2bbc03a..0fe16f5 100644 --- a/src/shared/WADEDITOR_dfwad.pas +++ b/src/shared/WADEDITOR_dfwad.pas @@ -645,7 +645,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