From eea012472ec3362d97402d2253ccdb09965b9f7f Mon Sep 17 00:00:00 2001 From: David Gannerud Date: Fri, 8 Jul 2022 12:19:11 +0200 Subject: [PATCH] Ladybird: Prevent loading of invalid URL Loading invalid URL will result in a crash. --- Ladybird/WebView.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ladybird/WebView.cpp b/Ladybird/WebView.cpp index 3769a15abe..fb558445cb 100644 --- a/Ladybird/WebView.cpp +++ b/Ladybird/WebView.cpp @@ -80,6 +80,9 @@ public: void load(AK::URL const& url) { + if (!url.is_valid()) + return; + page().load(url); }