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:
parent
4cb845983d
commit
30a9c7c7a7
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue