summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/device.cxx6
1 files changed, 4 insertions, 2 deletions
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);
}