Avoid crash when recovering from syntax error in RELIABILITY.
authorJohn Darrington <john@darrington.wattle.id.au>
Sun, 21 Sep 2008 02:42:15 +0000 (10:42 +0800)
committerJohn Darrington <john@darrington.wattle.id.au>
Sun, 21 Sep 2008 02:42:15 +0000 (10:42 +0800)
src/language/stats/reliability.q

index 0222a3f33dfd41b54649d68dd1a5f4adb6cd67de..8384bb350312100214e33cfcff1b1f5057d70703 100644 (file)
@@ -262,8 +262,11 @@ cmd_reliability (struct lexer *lexer, struct dataset *ds)
       free (c->items);
 
       moments1_destroy (c->total);
-      for (x = 0 ; x < c->n_items; ++x)
-       moments1_destroy (c->m[x]);
+
+      if ( c->m)
+       for (x = 0 ; x < c->n_items; ++x)
+         moments1_destroy (c->m[x]);
+
       free (c->m);
     }