Ensure the new `depth' and `treepath' structure fields in struct

selparam are always properly initialised.

[originally from svn r7972]
This commit is contained in:
Simon Tatham 2008-04-05 12:53:32 +00:00
Родитель db281abd97
Коммит 2503cd1861
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -2998,6 +2998,7 @@ int do_config_box(const char *title, Config *cfg, int midsession,
-1); -1);
treeiterlevels[j] = treeiter; treeiterlevels[j] = treeiter;
selparams[nselparams].depth = j;
if (j > 0) { if (j > 0) {
selparams[nselparams].treepath = selparams[nselparams].treepath =
gtk_tree_model_get_path(GTK_TREE_MODEL(treestore), gtk_tree_model_get_path(GTK_TREE_MODEL(treestore),
@ -3011,7 +3012,8 @@ int do_config_box(const char *title, Config *cfg, int midsession,
gtk_tree_view_expand_row(GTK_TREE_VIEW(tree), gtk_tree_view_expand_row(GTK_TREE_VIEW(tree),
selparams[nselparams].treepath, selparams[nselparams].treepath,
FALSE); FALSE);
selparams[nselparams].depth = j; } else {
selparams[nselparams].treepath = NULL;
} }
#else #else
treeitem = gtk_tree_item_new_with_label(c); treeitem = gtk_tree_item_new_with_label(c);