X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fdriver.c;h=81ef6690e5bcf3de7f88fcab4325ed4b3eeb0f69;hb=d3fd659f663602b5564e4c750c0bebe48ff72865;hp=3178878036a167587943077e8d0a184a4dba7722;hpb=0df9cdd3df66caf4353128feff3008289cda8115;p=pspp diff --git a/src/output/driver.c b/src/output/driver.c index 3178878036..81ef6690e5 100644 --- a/src/output/driver.c +++ b/src/output/driver.c @@ -25,7 +25,7 @@ #include #include -#include "data/file-name.h" +#include "data/file-handle-def.h" #include "data/settings.h" #include "libpspp/array.h" #include "libpspp/assertion.h" @@ -159,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,8 +378,10 @@ output_driver_create (struct string_map *options) device_string, "terminal", "listing"); device_type = default_device_type (file_name); } + + struct file_handle *fh = fh_create_file (NULL, file_name, NULL, fh_default_properties ()); - driver = f->create (file_name, device_type, options); + driver = f->create (fh, device_type, options); if (driver != NULL) { const struct string_map_node *node;