https://bugzilla.gnome.org/show_bug.cgi?id=661988
}
var container = (MediaContainer) media_object;
- this.total_matches = container.child_count;
+ if (container.child_count < int.MAX) {
+ this.total_matches = container.child_count;
+ } else {
+ this.total_matches = 0;
+ }
if (this.requested_count == 0) {
// No max count requested, try to fetch all children
string service_name,
string path,
Container? parent = null) throws IOError {
- base (id, parent, title, (int) child_count);
+ base (id, parent, title, (int) child_count.clamp (0, int.MAX));
this.service_name = service_name;
this.item_factory = new ItemFactory ();