From 12c4777c0674e5dc24ef3691808fb6f25fee2ce7 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Fri, 10 Oct 2014 11:56:41 +0200 Subject: [PATCH] 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 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panels/printers/pp-host.c b/panels/printers/pp-host.c index 081a3d2fe..2bf3271f1 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,