From 570c6374806d0f1ec59cf7a72543efe6b5b637be Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 15 Nov 2013 09:06:57 +0100 Subject: Fix/mute issues found by Coverity scan This makes the code free of Coverity scan issues. It is sometimes quite pedantic and expects/suggests some coding habits, thus certain changes may look weird, but for a good thing, I hope. The code is also tagged with Coverity scan suppressions, to keep the code as is and hide the warning too. Also note that Coverity treats g_return_if_fail(), g_assert() and similar macros as unreliable, and it's true these can be disabled during the compile time, thus it brings in other set of 'weird' changes. --- e-util/gal-a11y-e-cell-tree.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'e-util/gal-a11y-e-cell-tree.c') diff --git a/e-util/gal-a11y-e-cell-tree.c b/e-util/gal-a11y-e-cell-tree.c index e0757f5300..07d6ac331b 100644 --- a/e-util/gal-a11y-e-cell-tree.c +++ b/e-util/gal-a11y-e-cell-tree.c @@ -191,15 +191,14 @@ gal_a11y_e_cell_tree_new (ETableItem *item, { AtkObject *subcell_a11y; GalA11yECellTree *a11y; - ETreePath node; ETreeModel *tree_model; ETreeTableAdapter *tree_table_adapter; - ECellView *subcell_view; + subcell_view = e_cell_tree_view_get_subcell_view (cell_view); - if (subcell_view->ecell) { + if (subcell_view && subcell_view->ecell) { subcell_a11y = gal_a11y_e_cell_registry_get_object ( NULL, item, @@ -233,8 +232,7 @@ gal_a11y_e_cell_tree_new (ETableItem *item, if (e_tree_table_adapter_node_is_expanded (tree_table_adapter, node)) gal_a11y_e_cell_add_state (GAL_A11Y_E_CELL (subcell_a11y), ATK_STATE_EXPANDED, FALSE); } - } - else + } else subcell_a11y = NULL; /* create a companion a11y object, this object has type GalA11yECellTree -- cgit v1.2.3