Check for visual data before accessing to avoid crash.
<rdar://problem/105522607>
Pull request: https://github.com/WebKit/WebKit/pull/10181
Committed 260343@main (b5fa2df93bda): <https://commits.webkit.org/260343@main> Reviewed commits have been landed. Closing PR #10181 and removing active labels.