Fix crash in FLIP with no variables.
[pspp] / src / language / stats / flip.c
index 68152b1b190b4c90d8754205279f45e623ab75c3..9d3b0a6346cb460484e64286f840647eddef154d 100644 (file)
@@ -144,6 +144,8 @@ cmd_flip (struct lexer *lexer, struct dataset *ds)
            break;
          }
     }
+  if (flip->n_vars <= 0)
+    goto error;
 
   flip->file = pool_create_temp_file (flip->pool);
   if (flip->file == NULL)