Author: AlbrechtS
Date: 2010-03-04 15:55:05 -0800 (Thu, 04 Mar 2010)
New Revision: 7216
Log:
Fixed a problem where cancelling a print job would crash the test/device.cxx
demo program. Maybe this was the case where "zombie" processes could be seen.


Modified:
   branches/branch-1.3-Fl_Printer/test/device.cxx

Modified: branches/branch-1.3-Fl_Printer/test/device.cxx
===================================================================
--- branches/branch-1.3-Fl_Printer/test/device.cxx      2010-03-04 18:04:28 UTC 
(rev 7215)
+++ branches/branch-1.3-Fl_Printer/test/device.cxx      2010-03-04 23:55:05 UTC 
(rev 7216)
@@ -602,12 +602,13 @@
   Fl_Printer * p = new Fl_Printer();
     //p->page(Fl_Printer::A4);
     //p->place(g, 70, 70, p->page_width() - 140, p->page_height() - 140,  
FL_ALIGN_CENTER);
-  p->start_job(1);
-  p->start_page();
-  p->print_widget(g);
-  p->end_page();
-  p->end_job();
-    delete p;
+  if (!p->start_job(1)) {
+    p->start_page();
+    p->print_widget(g);
+    p->end_page();
+    p->end_job();
+  }
+  delete p;
 };
 
 /*void print2(Fl_Widget *, void *w) {

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to