backend-headless: Don't try to finish frame if it was cancelled
This is a bit of a dumb copy from what the DRM backend does in what I think is a similar situation, but I'm not entirely sure this is the correct fix.
This is a bit of a dumb copy from what the DRM backend does in what I think is a similar situation, but I'm not entirely sure this is the correct fix.