diff --git a/src/lib/webengine/webview.cpp b/src/lib/webengine/webview.cpp index 7867a9d06..3e3b1f28c 100644 --- a/src/lib/webengine/webview.cpp +++ b/src/lib/webengine/webview.cpp @@ -176,13 +176,16 @@ void WebView::load(const LoadRequest &request) !reqUrl.path().contains(QL1C(' ')) && !reqUrl.path().contains(QL1C('.')) ) { - // FIXME: This is blocking... - QHostInfo info = QHostInfo::fromName(reqUrl.path()); - if (info.error() == QHostInfo::NoError) { - LoadRequest req = request; - req.setUrl(QUrl(QSL("http://") + reqUrl.path())); - loadRequest(req); - return; + QUrl u(QSL("http://") + reqUrl.path()); + if (u.isValid()) { + // This is blocking... + QHostInfo info = QHostInfo::fromName(u.path()); + if (info.error() == QHostInfo::NoError) { + LoadRequest req = request; + req.setUrl(u); + loadRequest(req); + return; + } } }