Otherwise the paint handler will still be run for the subsequent tests. This ends up writing to the ‘state’ variable which used to be on the stack so it will end up corrupting some stack variable. This was causing test-cogl-premult to fail.