From 5c26087e6272f1d0bc3d835ce901613e9d488a28 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pawe=C5=82=20Forysiuk?= Date: Fri, 10 Aug 2012 18:46:41 +0200 Subject: [PATCH] Return no search engine if there's no form Such as http://valadoc.org/#!wiki=index --- midori/midori-view.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/midori/midori-view.c b/midori/midori-view.c index 4fd9ce39..d4d56ea5 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -2471,6 +2471,10 @@ midori_view_search_engine_for_form (MidoriView* view, active_element = webkit_dom_html_document_get_active_element ((WebKitDOMHTMLDocument*)doc); active_form = webkit_dom_html_input_element_get_form ((WebKitDOMHTMLInputElement*)active_element); + + if (!active_form) + return NULL; + token_element = webkit_dom_element_get_attribute (active_element, "name"); form_nodes = webkit_dom_html_form_element_get_elements (active_form); -- 2.39.5