printers: Fix crash in actualize_printers_list()

This fixes a typo in handling of printers options in actualize_printers_list()
which caused a crash when number of printers exceeded number of options (#672689).
This commit is contained in:
Marek Kasik 2012-03-23 14:30:24 +01:00
parent 4cb845983d
commit 30a9c7c7a7

View file

@ -1039,8 +1039,8 @@ actualize_printers_list (CcPrintersPanel *self)
paused = (g_strcmp0 (priv->dests[i].options[j].value, "5") == 0);
else if (g_strcmp0 (priv->dests[i].options[j].name, "device-uri") == 0)
device_uri = priv->dests[i].options[j].value;
else if (g_strcmp0 (priv->dests[i].options[i].name, "printer-type") == 0)
printer_type = atoi (priv->dests[i].options[i].value);
else if (g_strcmp0 (priv->dests[i].options[j].name, "printer-type") == 0)
printer_type = atoi (priv->dests[i].options[j].value);
}
if (priv->dests[i].is_default)