gridview: Add an assertion
authorMatthias Clasen <mclasen@redhat.com>
Wed, 17 May 2023 23:01:08 +0000 (19:01 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 20 May 2023 16:26:51 +0000 (12:26 -0400)
The want to use the footer tile at the end
to fill leftover space at the bottome right.

So lets assert that we actually dealing with
a footer tile, just in case something changes
in the future that might have us end up with
some other kind of tile.

gtk/gtkgridview.c

index 94307af5244ab73a736e9f386445161b9f2fe6a3..9618f8e5c28df9df776f9568e21f35e231ccd763 100644 (file)
@@ -885,6 +885,7 @@ gtk_grid_view_size_allocate (GtkWidget *widget,
     {
       GtkListTile *filler;
       tile = gtk_list_item_manager_get_last (self->item_manager);
+      g_assert (gtk_list_tile_is_footer (tile));
       filler = gtk_list_tile_append_filler (self->item_manager, tile);
       gtk_list_tile_set_area_position (self->item_manager,
                                        filler,