Merge lp:~donadigo/switchboard/fix-g-sequence-get-warnings into lp:~elementary-pantheon/switchboard/switchboard

Proposed by Adam Bieńkowski
Status: Merged
Approved by: Zisu Andrei
Approved revision: 694
Merged at revision: 694
Proposed branch: lp:~donadigo/switchboard/fix-g-sequence-get-warnings
Merge into: lp:~elementary-pantheon/switchboard/switchboard
Diff against target: 24 lines (+6/-7)
1 file modified
src/Widgets/CategoryFlowBox.vala (+6/-7)
To merge this branch: bzr merge lp:~donadigo/switchboard/fix-g-sequence-get-warnings
Reviewer Review Type Date Requested Status
Zisu Andrei (community) Approve
Review via email: mp+310010@code.launchpad.net

Commit message

* Fix "g_sequence_get: assertion '!is_end (iter)' failed" fatal warnings

Description of the change

Fix "g_sequence_get: assertion '!is_end (iter)' failed" fatal warnings.
No need to check if there is a 0th child in the flowbox.

To post a comment you must log in.
Revision history for this message
Zisu Andrei (matzipan) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Widgets/CategoryFlowBox.vala'
2--- src/Widgets/CategoryFlowBox.vala 2016-05-12 18:08:35 +0000
3+++ src/Widgets/CategoryFlowBox.vala 2016-11-03 21:59:30 +0000
4@@ -88,14 +88,13 @@
5 }
6
7 public bool has_child () {
8- if (flowbox.get_child_at_index (0) != null) {
9- foreach (unowned Gtk.Widget child in flowbox.get_children ()) {
10- if (child.get_child_visible ()) {
11- show_all ();
12- return true;
13- }
14- }
15+ foreach (unowned Gtk.Widget child in flowbox.get_children ()) {
16+ if (child.get_child_visible ()) {
17+ show_all ();
18+ return true;
19+ }
20 }
21+
22 hide ();
23 return false;
24 }

Subscribers

People subscribed via source and target branches

to all changes: