mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
gtktreeviewaccessible: Fix potential uses of uninitialised variables
Found with scan-build. https://bugzilla.gnome.org/show_bug.cgi?id=712760
This commit is contained in:
parent
087b61f653
commit
480a005039
@ -762,7 +762,11 @@ gtk_tree_view_accessible_get_selected_rows (AtkTable *table,
|
||||
|
||||
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
|
||||
if (widget == NULL)
|
||||
return 0;
|
||||
{
|
||||
if (rows_selected != NULL)
|
||||
*rows_selected = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
data.treeview = GTK_TREE_VIEW (widget);
|
||||
data.array = g_array_new (FALSE, FALSE, sizeof (gint));
|
||||
@ -1016,6 +1020,12 @@ gtk_tree_view_accessible_get_cell_area (GtkCellAccessibleParent *parent,
|
||||
GtkTreeViewAccessibleCellInfo *cell_info;
|
||||
GtkCellAccessible *top_cell;
|
||||
|
||||
/* Default value. */
|
||||
cell_rect->x = 0;
|
||||
cell_rect->y = 0;
|
||||
cell_rect->width = 0;
|
||||
cell_rect->height = 0;
|
||||
|
||||
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
|
||||
if (widget == NULL)
|
||||
return;
|
||||
@ -1256,7 +1266,7 @@ gtk_tree_view_accessible_get_renderer_state (GtkCellAccessibleParent *parent,
|
||||
GtkTreeViewColumn *column;
|
||||
GtkTreePath *path;
|
||||
GtkRBTree *tree;
|
||||
GtkRBNode *node;
|
||||
GtkRBNode *node = NULL;
|
||||
|
||||
gtk_tree_view_get_cursor (treeview, &path, &column);
|
||||
if (path)
|
||||
|
Loading…
Reference in New Issue
Block a user