forked from AuroraMiddleware/gtk
gtktreeviewaccessible: Fix a potential division by zero
Found with scan-build. https://bugzilla.gnome.org/show_bug.cgi?id=712760
This commit is contained in:
parent
86b6170940
commit
ada766025f
@ -954,7 +954,7 @@ gtk_tree_view_accessible_ref_selection (AtkSelection *selection,
|
||||
table = ATK_TABLE (selection);
|
||||
n_columns = gtk_tree_view_accessible_get_n_columns (table);
|
||||
n_selected = gtk_tree_view_accessible_get_selected_rows (table, &selected);
|
||||
if (i >= n_columns * n_selected)
|
||||
if (n_columns == 0 || i >= n_columns * n_selected)
|
||||
return NULL;
|
||||
|
||||
row = selected[i / n_columns];
|
||||
|
Loading…
Reference in New Issue
Block a user