Merge lp://staging/~stolowski/unity-lens-video/fix-1133696-crash into lp://staging/unity-lens-video

Proposed by Paweł Stołowski
Status: Merged
Approved by: Michal Hruby
Approved revision: 108
Merged at revision: 108
Proposed branch: lp://staging/~stolowski/unity-lens-video/fix-1133696-crash
Merge into: lp://staging/unity-lens-video
Diff against target: 18 lines (+4/-3)
1 file modified
src/remote-scope.vala (+4/-3)
To merge this branch: bzr merge lp://staging/~stolowski/unity-lens-video/fix-1133696-crash
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+151204@code.staging.launchpad.net

Commit message

Don't call remove_option in the loop which iterates over them when refreshing 'Sources'.

Description of the change

Don't call remove_option in the loop which iterates over them when refreshing 'Sources'. This modifies the collection that is iterated and causes two problems: 1) only 1st item is removed and then the loop breaks, leaving remaining filter options intact, so the list of filter options keeps growing. 2) it eventually crashes ( it crashed after around 20 calls to sources_cb in my test, I modified REFRESH_INTERVAL to refresh every 3 secs to reproduce).

To post a comment you must log in.
Revision history for this message
Michal Hruby (mhr3) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches