diff options
author | Kevin Meyer <kevinmeyer@me.com> | 2020-07-07 11:03:55 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-07 11:07:44 +0200 |
commit | 7974279a5d37bec170d5c3fec9a30e76f052df9a (patch) | |
tree | cb24069c4f5515f0b4994323725fad7bb2823ff4 | |
parent | 93ebd320ef4d1f3f118677705ace70f14b2437c9 (diff) | |
download | serenity-7974279a5d37bec170d5c3fec9a30e76f052df9a.zip |
LibWeb: Fix PageView::url() null-check
-rw-r--r-- | Libraries/LibWeb/PageView.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibWeb/PageView.cpp b/Libraries/LibWeb/PageView.cpp index 2f2b34430f..8b33f1d0ba 100644 --- a/Libraries/LibWeb/PageView.cpp +++ b/Libraries/LibWeb/PageView.cpp @@ -45,8 +45,8 @@ #include <LibWeb/Dump.h> #include <LibWeb/Frame/EventHandler.h> #include <LibWeb/Frame/Frame.h> -#include <LibWeb/Layout/LayoutDocument.h> #include <LibWeb/Layout/LayoutBreak.h> +#include <LibWeb/Layout/LayoutDocument.h> #include <LibWeb/Layout/LayoutNode.h> #include <LibWeb/Layout/LayoutText.h> #include <LibWeb/Loader/ResourceLoader.h> @@ -370,7 +370,7 @@ void PageView::keydown_event(GUI::KeyEvent& event) URL PageView::url() const { - if (page().main_frame().document()) + if (!page().main_frame().document()) return {}; return page().main_frame().document()->url(); } |