BrowserSettings: Avoid adding empty domain to content filter

This commit is contained in:
ferhatgec 2022-06-17 02:23:00 +03:00 committed by Linus Groh
commit e9e1959d4c
Notes: sideshowbarker 2024-07-19 17:05:02 +09:00

View file

@ -119,7 +119,9 @@ ContentFilterSettingsWidget::ContentFilterSettingsWidget()
m_add_new_domain_button->on_click = [&](unsigned) {
String text;
if (GUI::InputBox::show(window(), text, "Enter domain name", "Add domain to Content Filter") == GUI::Dialog::ExecResult::OK) {
if (GUI::InputBox::show(window(), text, "Enter domain name", "Add domain to Content Filter") == GUI::Dialog::ExecResult::OK
&& !text.is_empty()) {
m_domain_list_model->add_domain(std::move(text));
set_modified(true);
}