From d8d64dd9e4ca2f0fbedce9735a22b0ed5f8ebd53 Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Fri, 29 Sep 2023 14:38:25 +0300 Subject: [PATCH] dfwad: fix use before assignment --- src/shared/WADEDITOR_dfwad.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.29.2