[gnome-control-center] printers: Don't crash for URIs with leading "//"



commit 12c4777c0674e5dc24ef3691808fb6f25fee2ce7
Author: Marek Kasik <mkasik redhat com>
Date:   Fri Oct 10 11:56:41 2014 +0200

    printers: Don't crash for URIs with leading "//"
    
    Initialize result of getting of LPD devices early to avoid crash.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738165

 panels/printers/pp-host.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/panels/printers/pp-host.c b/panels/printers/pp-host.c
index 081a3d2..2bf3271 100644
--- a/panels/printers/pp-host.c
+++ b/panels/printers/pp-host.c
@@ -688,13 +688,13 @@ _pp_host_get_lpd_devices_thread (GTask        *task,
   else
     port = priv->port;
 
+  result = data->devices;
+  data->devices = NULL;
+
   address = g_strdup_printf ("%s:%d", priv->hostname, port);
   if (address == NULL || address[0] == '/')
     goto out;
 
-  result = data->devices;
-  data->devices = NULL;
-
   client = g_socket_client_new ();
 
   connection = g_socket_client_connect_to_host (client,


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