Skip to content

Commit 10e0911

Browse files
author
jgray-19
committed
Make plots only close only if they are made
1 parent ab0e333 commit 10e0911

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/madl_plot.mad

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,9 @@ local function teardown_cmd (self, file, fname)
332332
then gnuplot_mv(fname, scrdump)
333333
else gnuplot_rm(fname)
334334
end
335-
if close_plots then atexit(\-> kill_plots(self)) end
335+
if close_plots and is_number(output) or is_nil(output) then
336+
atexit(\-> kill_plots(self))
337+
end
336338
else
337339
if is_string(scrdump) then
338340
os.rename(fname, scrdump)

0 commit comments

Comments
 (0)