[gnome-control-center] printers: Check if device_info is NULL (I don't think it can be but was requested in bugzilla)



commit 1aace205fcd28a5ce87949ae2b85b03eacae834e
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Mar 1 09:33:20 2012 +1100

    printers: Check if device_info is NULL (I don't think it can be but was requested in bugzilla)

 panels/printers/pp-new-printer-dialog.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/panels/printers/pp-new-printer-dialog.c b/panels/printers/pp-new-printer-dialog.c
index a69cb6b..0b21502 100644
--- a/panels/printers/pp-new-printer-dialog.c
+++ b/panels/printers/pp-new-printer-dialog.c
@@ -1554,7 +1554,7 @@ new_printer_add_button_cb (GtkButton *button,
                                                                            pp->devices[device_id].display_name,
                                                                            pp->devices[device_id].device_uri,
                                                                            ppd_file_name,
-                                                                           pp->devices[device_id].device_info,
+                                                                           pp->devices[device_id].device_info ? pp->devices[device_id].device_info : "",
                                                                            pp->devices[device_id].device_location ? pp->devices[device_id].device_location : ""),
                                                             G_VARIANT_TYPE ("(s)"),
                                                             G_DBUS_CALL_FLAGS_NONE,
@@ -1691,7 +1691,7 @@ new_printer_add_button_cb (GtkButton *button,
                                                                        pp->devices[device_id].display_name,
                                                                        pp->devices[device_id].device_uri,
                                                                        ppd_name->ppd_name,
-                                                                       pp->devices[device_id].device_info,
+                                                                       pp->devices[device_id].device_info ? pp->devices[device_id].device_info : "",
                                                                        pp->devices[device_id].device_location ? pp->devices[device_id].device_location : ""),
                                                         G_VARIANT_TYPE ("(s)"),
                                                         G_DBUS_CALL_FLAGS_NONE,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]