From: Paweł Forysiuk Date: Fri, 10 Aug 2012 16:46:41 +0000 (+0200) Subject: Return no search engine if there's no form X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c26087e6272f1d0bc3d835ce901613e9d488a28;p=midori Return no search engine if there's no form Such as http://valadoc.org/#!wiki=index --- 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);