X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fdriver.c;h=afb5084fa1d2abc0d76c59d77179fe5a86902b97;hb=ad4f9604cc877272fe504234e8b9078a7ce76e17;hp=94bc2411c97878781980a455818e326357e7bb6e;hpb=5882d195ad6891b87dba6ded8a5caa1a949f165f;p=pspp diff --git a/src/output/driver.c b/src/output/driver.c index 94bc2411c9..afb5084fa1 100644 --- a/src/output/driver.c +++ b/src/output/driver.c @@ -25,6 +25,7 @@ #include #include +#include "data/file-handle-def.h" #include "data/settings.h" #include "libpspp/array.h" #include "libpspp/assertion.h" @@ -158,6 +159,9 @@ output_submit (struct output_item *item) { struct output_engine *e = engine_stack_top (); + if (item == NULL) + return; + if (is_syntax_item (item)) { ds_put_cstr (&e->deferred_syntax, text_item_get_text (to_text_item (item))); @@ -375,7 +379,9 @@ output_driver_create (struct string_map *options) device_type = default_device_type (file_name); } - driver = f->create (file_name, device_type, options); + struct file_handle *fh = fh_create_file (NULL, file_name, NULL, fh_default_properties ()); + + driver = f->create (fh, device_type, options); if (driver != NULL) { const struct string_map_node *node;