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:
parent
49a0406425
commit
12c4777c06
1 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue