The following script:

<verbatim>
  CREATE TABLE t0(c0);
  INSERT INTO t0(c0) VALUES (0);
  SELECT * FROM t0 WHERE EXISTS (SELECT MIN(c0)  OVER (), CUME_DIST()
  OVER () FROM t0) BETWEEN 1 AND 1;
</verbatim>

causes a null pointer dereference.

This bug was discovered and reported by Manuel Rigger (user mrigger).