diff options
author | portix <none@none> | 2012-06-03 14:58:30 +0200 |
---|---|---|
committer | portix <none@none> | 2012-06-03 14:58:30 +0200 |
commit | 64321ca7aac7c02b2b2c1da6c3aca601799270d2 (patch) | |
tree | 2a39b37a8882d70711f772990d87b97471454e19 /src/adblock.c | |
parent | 1fa7f191f0e7a7a026c05aa00cbaddc6befc1904 (diff) | |
download | dwb-64321ca7aac7c02b2b2c1da6c3aca601799270d2.zip |
Check for hinttype when creating image map hints, fixes #186
Diffstat (limited to 'src/adblock.c')
-rw-r--r-- | src/adblock.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/adblock.c b/src/adblock.c index 51bf61fa..273268f6 100644 --- a/src/adblock.c +++ b/src/adblock.c @@ -336,9 +336,11 @@ adblock_apply_element_hider(WebKitWebFrame *frame, GList *gl) { VIEW(gl)->status->style = webkit_dom_document_create_element(doc, "style", NULL); } WebKitDOMHTMLHeadElement *head = webkit_dom_document_get_head(doc); - webkit_dom_html_element_set_inner_html(WEBKIT_DOM_HTML_ELEMENT(VIEW(gl)->status->style), css_rule->str, NULL); - webkit_dom_node_append_child(WEBKIT_DOM_NODE(head), WEBKIT_DOM_NODE(VIEW(gl)->status->style), NULL); - g_object_unref(head); + if (G_IS_OBJECT(head)) { + webkit_dom_html_element_set_inner_html(WEBKIT_DOM_HTML_ELEMENT(VIEW(gl)->status->style), css_rule->str, NULL); + webkit_dom_node_append_child(WEBKIT_DOM_NODE(head), WEBKIT_DOM_NODE(VIEW(gl)->status->style), NULL); + g_object_unref(head); + } } else { const char *css = css_rule->str; |