[california] Fix crash w/ Quick Add when one calendar can't load (bad URL)



commit 9121f41297b2c5473da10a3496ffc22377e477f9
Author: Jim Nelson <jim yorba org>
Date:   Wed Apr 23 14:29:12 2014 -0700

    Fix crash w/ Quick Add when one calendar can't load (bad URL)

 src/toolkit/toolkit-combo-box-text-model.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/toolkit/toolkit-combo-box-text-model.vala b/src/toolkit/toolkit-combo-box-text-model.vala
index 7bd613d..a317ca6 100644
--- a/src/toolkit/toolkit-combo-box-text-model.vala
+++ b/src/toolkit/toolkit-combo-box-text-model.vala
@@ -86,7 +86,7 @@ public class ComboBoxTextModel<G> : BaseObject {
         int added_index = items.index_of(item);
         
         // any existing indices need to be incremented
-        foreach (G key in indices.keys) {
+        foreach (G key in indices.keys.to_array()) {
             int existing_index = indices.get(key);
             if (existing_index >= added_index)
                 indices.set(key, existing_index + 1);
@@ -113,7 +113,7 @@ public class ComboBoxTextModel<G> : BaseObject {
         if (!indices.unset(item, out removed_index))
             return false;
         
-        foreach (G key in indices.keys) {
+        foreach (G key in indices.keys.to_array()) {
             int existing_index = indices.get(key);
             assert(existing_index != removed_index);
             


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]