From 2503cd18613d6d05e6fbc24b79d17bd9dbcb8789 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 5 Apr 2008 12:53:32 +0000 Subject: [PATCH] Ensure the new `depth' and `treepath' structure fields in struct selparam are always properly initialised. [originally from svn r7972] --- unix/gtkdlg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unix/gtkdlg.c b/unix/gtkdlg.c index 42b4d950..fbd9a4d9 100644 --- a/unix/gtkdlg.c +++ b/unix/gtkdlg.c @@ -2998,6 +2998,7 @@ int do_config_box(const char *title, Config *cfg, int midsession, -1); treeiterlevels[j] = treeiter; + selparams[nselparams].depth = j; if (j > 0) { selparams[nselparams].treepath = 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), selparams[nselparams].treepath, FALSE); - selparams[nselparams].depth = j; + } else { + selparams[nselparams].treepath = NULL; } #else treeitem = gtk_tree_item_new_with_label(c);