Gitweb links:

...log 
http://git.netsurf-browser.org/libdom.git/shortlog/af49ffb2b148e146feada9dea59342508414f122
...commit 
http://git.netsurf-browser.org/libdom.git/commit/af49ffb2b148e146feada9dea59342508414f122
...tree 
http://git.netsurf-browser.org/libdom.git/tree/af49ffb2b148e146feada9dea59342508414f122

The branch, master has been updated
       via  af49ffb2b148e146feada9dea59342508414f122 (commit)
      from  93b8a9bba18fc3166dd158484188b1730afdd382 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/libdom.git/commit/?id=af49ffb2b148e146feada9dea59342508414f122
commit af49ffb2b148e146feada9dea59342508414f122
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    html: Check for missing thead rather than dereffing a NULL
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/src/html/html_tablerow_element.c b/src/html/html_tablerow_element.c
index fe7d929..569e70f 100644
--- a/src/html/html_tablerow_element.c
+++ b/src/html/html_tablerow_element.c
@@ -244,16 +244,17 @@ dom_exception dom_html_table_row_element_get_row_index(
                        return exp;
                }
 
-               exp = dom_html_table_section_element_get_rows(t_head, &rows);
-               dom_node_unref(t_head);
-               if (exp != DOM_NO_ERR) {
-                       return exp;
-               }
-
-               dom_html_collection_get_length(rows, &len);
-               dom_html_collection_unref(rows);
+               if (t_head != NULL) {
+                       exp = dom_html_table_section_element_get_rows(t_head, 
&rows);
+                       dom_node_unref(t_head);
+                       if (exp != DOM_NO_ERR) {
+                               return exp;
+                       }
 
-               count += len;
+                       dom_html_collection_get_length(rows, &len);
+                       dom_html_collection_unref(rows);
+                       count += len;
+               }
 
                for (n = n->first_child;n != parent && n != NULL;
                        n = n->next) {


-----------------------------------------------------------------------

Summary of changes:
 src/html/html_tablerow_element.c |   19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/html/html_tablerow_element.c b/src/html/html_tablerow_element.c
index fe7d929..569e70f 100644
--- a/src/html/html_tablerow_element.c
+++ b/src/html/html_tablerow_element.c
@@ -244,16 +244,17 @@ dom_exception dom_html_table_row_element_get_row_index(
                        return exp;
                }
 
-               exp = dom_html_table_section_element_get_rows(t_head, &rows);
-               dom_node_unref(t_head);
-               if (exp != DOM_NO_ERR) {
-                       return exp;
-               }
-
-               dom_html_collection_get_length(rows, &len);
-               dom_html_collection_unref(rows);
+               if (t_head != NULL) {
+                       exp = dom_html_table_section_element_get_rows(t_head, 
&rows);
+                       dom_node_unref(t_head);
+                       if (exp != DOM_NO_ERR) {
+                               return exp;
+                       }
 
-               count += len;
+                       dom_html_collection_get_length(rows, &len);
+                       dom_html_collection_unref(rows);
+                       count += len;
+               }
 
                for (n = n->first_child;n != parent && n != NULL;
                        n = n->next) {


-- 
Document Object Model library
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to