types/wlr_output: validate swapchain creation before destroying the current one

3 jobs for output_cursor_swapchain in 2 minutes and 18 seconds (queued for 2 seconds)
latest
Name Stage Failure
failed
freebsd Test
dalligi: submitted https://builds.sr.ht/~emersion/job/630365
failed
archlinux Test
dalligi: submitted https://builds.sr.ht/~emersion/job/630364