Abort the screenshot taking if no window could be obtained