Merge lp:~azzar1/unity/lp-926979 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Christopher Townsend
Approved revision: no longer in the source branch.
Merged at revision: 3938
Proposed branch: lp:~azzar1/unity/lp-926979
Merge into: lp:unity
Diff against target: 14 lines (+3/-1)
1 file modified
dash/DashView.cpp (+3/-1)
To merge this branch: bzr merge lp:~azzar1/unity/lp-926979
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Stephen M. Webb (community) Approve
Review via email: mp+253724@code.launchpad.net

Commit message

Make sure scope_views_[filter.id] exists before using operator[] on it.

Description of the change

Make sure scope_views_[filter.id] exists before using operator[] on it.

To post a comment you must log in.
Revision history for this message
Stephen M. Webb (bregma) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dash/DashView.cpp'
2--- dash/DashView.cpp 2014-07-09 11:18:45 +0000
3+++ dash/DashView.cpp 2015-03-20 18:05:06 +0000
4@@ -1174,7 +1174,9 @@
5
6 if (!filter.filters.empty())
7 {
8- scope_views_[filter.id]->filters_expanded = true;
9+ if (scope_views_.find(filter.id) != std::end(scope_views_))
10+ scope_views_[filter.id]->filters_expanded = true;
11+
12 // update the scope for each filter
13 for (auto p : filter.filters) {
14 UpdateScopeFilter(filter.id, p.first, p.second);