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
This commit is contained in:
Marek Kasik 2014-10-10 11:56:41 +02:00
parent 49a0406425
commit 12c4777c06

View file

@ -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,