Fix problem with gbv_treeview_resized_cb

If you have a budget page open and then open the preference dialog this
callback would be actioned and you will get invalid tree column error
in the trace file, add check to verify we have a tree view column.
This commit is contained in:
Robert Fewell 2017-07-23 11:38:56 +01:00 committed by John Ralls
parent 64b934f2be
commit 8fa2b0a67d

View File

@ -639,7 +639,8 @@ gbv_treeview_resized_cb(GtkWidget* widget, GtkAllocation* allocation, GncBudgetV
{
col_width = gtk_tree_view_column_get_width(tree_view_col);
totals_view_col = gtk_tree_view_get_column(priv->totals_tree_view, j);
gtk_tree_view_column_set_fixed_width(totals_view_col, col_width);
if(GTK_IS_TREE_VIEW_COLUMN(totals_view_col))
gtk_tree_view_column_set_fixed_width(totals_view_col, col_width);
j++;
}
}