Fix crash running two consecutive examine commands.
[pspp-builds.git] / src / language / stats / examine.q
index 78ea0e63c0b1989f3f35a0a1e1105e5bb269f76d..2649968b31485b105f6a80f3119ab39bdc851eea 100644 (file)
@@ -198,7 +198,7 @@ factor_destroy (struct xfactor *fctr)
 }
 
 static struct xfactor level0_factor;
-static struct ll_list factor_list = LL_INITIALIZER (factor_list);
+static struct ll_list factor_list;
 
 /* Parse the clause specifying the factors */
 static int examine_parse_independent_vars (struct lexer *lexer,
@@ -268,6 +268,8 @@ cmd_examine (struct lexer *lexer, struct dataset *ds)
   subc_list_double_create (&percentile_list);
   percentile_algorithm = PC_HAVERAGE;
 
+  ll_init (&factor_list);
+
   if ( !parse_examine (lexer, ds, &cmd, NULL) )
     {
       subc_list_double_destroy (&percentile_list);