[code] Added checks before using QWebPage::view().