[evolution] Cast warning printed when trying to cast non-element node to element in the get_parent_block_element



commit b91410757001378dd3c0bf80aa34d447fc073558
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Aug 19 16:43:31 2016 +0200

    Cast warning printed when trying to cast non-element node to element in the get_parent_block_element()

 web-extensions/e-dom-utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/web-extensions/e-dom-utils.c b/web-extensions/e-dom-utils.c
index 7d24826..b7c531a 100644
--- a/web-extensions/e-dom-utils.c
+++ b/web-extensions/e-dom-utils.c
@@ -1883,7 +1883,7 @@ get_parent_block_element (WebKitDOMNode *node)
        WebKitDOMElement *parent = webkit_dom_node_get_parent_element (node);
 
        if (WEBKIT_DOM_IS_HTML_BODY_ELEMENT (parent))
-               return WEBKIT_DOM_ELEMENT (node);
+               return WEBKIT_DOM_IS_ELEMENT (node) ? WEBKIT_DOM_ELEMENT (node) : NULL;
 
        while (parent &&
               !WEBKIT_DOM_IS_HTML_PARAGRAPH_ELEMENT (parent) &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]