app: Avoid a potential segfault when skipping columns

Closes: #2942
Approved by: mwleeds

(cherry picked from commit cd231503f2ee55a5f4b312a55af4534f80a20a7c)
This commit is contained in:
Ryan Gonzalez 2019-06-04 21:53:59 +00:00 committed by Alexander Larsson
parent 5a16666bdc
commit bfb7d4217a

View File

@ -372,6 +372,9 @@ colum_is_unique (FlatpakTablePrinter *printer, int col)
for (i = 0; i < printer->rows->len; i++)
{
Row *row = g_ptr_array_index (printer->rows, i);
if (col >= row->cells->len)
continue;
Cell *cell = g_ptr_array_index (row->cells, col);
if (i == 0)