[gnome-control-center] printers: Fix crash in actualize_printers_list()
- From: Marek KaÅÃk <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Fix crash in actualize_printers_list()
- Date: Fri, 23 Mar 2012 13:30:41 +0000 (UTC)
commit 30a9c7c7a719650f5ee95966f4cdca8b5ec18c90
Author: Marek Kasik <mkasik redhat com>
Date: Fri Mar 23 14:30:24 2012 +0100
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).
panels/printers/cc-printers-panel.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/panels/printers/cc-printers-panel.c b/panels/printers/cc-printers-panel.c
index 194830f..f5cf0d9 100644
--- a/panels/printers/cc-printers-panel.c
+++ b/panels/printers/cc-printers-panel.c
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]