fix(p.lua): ensure file handle is closed with zero samples

This commit is contained in:
Guilherme Batalheiro 2024-11-14 06:24:40 +01:00
parent 69bbf3c1b0
commit 31d7e29d73

View File

@ -227,6 +227,7 @@ local function prof_finish()
local samples = prof_samples
if samples == 0 then
if prof_raw ~= true then out:write("[No samples collected]\n") end
if out ~= stdout then out:close() end
return
end
if prof_ann then