Prevent critical when closing output viewer
[pspp] / src / ui / gui / psppire-output-window.c
index 62185befa9b177a3f337cdcd65453cf827ae67d1..4bf8ce5b287918488249cd7df3af47448047d89d 100644 (file)
@@ -109,7 +109,8 @@ psppire_output_window_dispose (GObject *obj)
   viewer->items = NULL;
   viewer->n_items = viewer->allocated_items = 0;
 
-  g_object_unref (viewer->print_settings);
+  if (viewer->print_settings != NULL)
+    g_object_unref (viewer->print_settings);
 
   /* Chain up to the parent class */
   G_OBJECT_CLASS (parent_class)->dispose (obj);
@@ -243,7 +244,6 @@ psppire_output_submit (struct output_driver *this,
          it is already close enough to INT_MAX when expressed as thousands of a
          point.) */
       string_map_insert (&options, "paper-size", "300x200000mm");
-      string_map_insert (&options, "headers", "off");
       string_map_insert (&options, "left-margin", "0");
       string_map_insert (&options, "right-margin", "0");
       string_map_insert (&options, "top-margin", "0");
@@ -1044,7 +1044,8 @@ GtkWidget*
 psppire_output_window_new (void)
 {
   return GTK_WIDGET (g_object_new (psppire_output_window_get_type (),
-                                  "filename", "Output",
+                                  /* TRANSLATORS: This will form a filename.  Please avoid whitespace. */
+                                  "filename", _("Output"),
                                   "description", _("Output Viewer"),
                                   NULL));
 }