chiark / gitweb /
copyright dates
[disorder] / disobedience / choose.c
index 369c601da819ad753d766e033edfb075d911d5e4..9a9ec342b605eb851d1a1c4c439d99fff4bf715e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of DisOrder
- * Copyright (C) 2006 Richard Kettlewell
+ * Copyright (C) 2006, 2007 Richard Kettlewell
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -93,6 +93,7 @@ static int nsearchresults;              /* number of results */
 
 /* Forward Declarations */
 
+static void clear_children(struct choosenode *cn);
 static struct choosenode *newnode(struct choosenode *parent,
                                   const char *path,
                                   const char *display,
@@ -174,6 +175,7 @@ static void fill_root_node(struct choosenode *cn) {
   struct callbackdata *cbd;
 
   D(("fill_root_node"));
+  clear_children(cn);
   if(choosealpha) {
     if(!cn->children.nvec) {              /* Only need to do this once */
       for(ch = 'A'; ch <= 'Z'; ++ch) {
@@ -996,4 +998,3 @@ fill-column:79
 indent-tabs-mode:nil
 End:
 */
-/* arch-tag:A5KX3X9SR8Pl57VRLSnCng */