~ubuntu-branches/ubuntu/precise/gwibber/precise-proposed-201206191543

« back to all changes in this revision

Viewing changes to libgwibber/streams.vala

  • Committer: Package Import Robot
  • Author(s): Ken VanDine
  • Date: 2012-04-04 17:04:37 UTC
  • Revision ID: package-import@ubuntu.com-20120404170437-fpksbdyv4vafsw0h
Tags: 3.4.0-0ubuntu2
* debian/patches/lp_959068.patch
  - work around a bug in libgee which causes the size of a HashMap to 
    change if you call unset while iterating it, which invalidates 
    the iterator (LP: #959068)

Show diffs side-by-side

added added

removed removed

Lines of Context:
213
213
                model = create_model ();
214
214
              }
215
215
              model.row_removed.connect((_m, _i) => {
 
216
                var to_remove = new GLib.List <string> ();
216
217
                foreach (var v in seen.entries)
217
218
                {
218
219
                  if (v.value == _i)
219
220
                  {
220
 
                    seen.unset(v.key);
 
221
                    /* defer calling unset until after we are done iterating 
 
222
                     * the HashMap, it will resize making the iterator invalid
 
223
                     * This is fixed in the 0.7 series of libgee
 
224
                     * https://bugzilla.gnome.org/show_bug.cgi?id=671327
 
225
                     */
 
226
                    to_remove.prepend (v.key);
221
227
                  }
222
228
                }
 
229
                foreach (var v in to_remove)
 
230
                  seen.unset(v);
223
231
              });
224
232
              Idle.add(() => {
225
233
                refresh_model_async.begin ();