From 4f28e61c24105cfa657fe35730cd0d3f1d4fcc63 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 11 Oct 2004 12:35:11 +0000 Subject: reviewed by: Christian Persch 2004-10-11 Marco Pesenti Gritti reviewed by: Christian Persch === Release 1.4.4 === * NEWS: * configure.in: Update for the release. * embed/print-dialog.c: (get_printer_name), (ephy_print_get_print_info): Ensure the printer name is sane. * lib/ephy-dialog.c: (set_combo_box_from_value): Mark the value sane also when we fallback to the first item in the list because there is not matching item in the model. --- embed/mozilla/EphyUtils.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'embed/mozilla') diff --git a/embed/mozilla/EphyUtils.cpp b/embed/mozilla/EphyUtils.cpp index c5e0bf666..89afedb40 100644 --- a/embed/mozilla/EphyUtils.cpp +++ b/embed/mozilla/EphyUtils.cpp @@ -174,9 +174,12 @@ EphyUtils::CollatePrintSettings (const EmbedPrintInfo *info, NS_CSTRING_ENCODING_UTF8, tmp); options->SetToFileName (tmp.get()); - NS_CStringToUTF16 (nsEmbedCString(info->printer), - NS_CSTRING_ENCODING_UTF8, tmp); - options->SetPrinterName (tmp.get()); + if (info->printer != NULL) + { + NS_CStringToUTF16 (nsEmbedCString(info->printer), + NS_CSTRING_ENCODING_UTF8, tmp); + options->SetPrinterName (tmp.get()); + } /** * Work around a mozilla bug where paper size & orientation are ignored -- cgit v1.2.3