From 2984fe638cefe617f749950622ee58a31c6b3ca1 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sat, 11 Jul 2020 12:21:25 +0200 Subject: Fix for building without print support (GitHub issue #98). --- test/device.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/device.cxx b/test/device.cxx index e922a77cd..e5e827073 100644 --- a/test/device.cxx +++ b/test/device.cxx @@ -643,9 +643,11 @@ void copy(Fl_Widget *, void *data) { wh = target->h(); } Fl_EPS_File_Surface p(ww, wh, eps); - if (target->as_window()) p.draw_decorated_window(target->as_window()); - else p.draw(target); + if (p.file()) { + if (target->as_window()) p.draw_decorated_window(target->as_window()); + else p.draw(target); //p.close(); + } } fclose(eps); } -- cgit v1.2.3