Skip to content

Commit

Permalink
null children check for pandas generated xlsx
Browse files Browse the repository at this point in the history
  • Loading branch information
V. Guruprasad committed Dec 28, 2024
1 parent 3372f93 commit 7d76103
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/formats/xlsx.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ void get_sheet_data(xmlDocPtr doc, xmlDocPtr doc_strings, xmlDocPtr doc_styles)
// inlinestring
} else if ( s != NULL && ! strcmp(s, "inlineStr") ) {
char * st = NULL;
char * strvalue = (char *) child_node->xmlChildrenNode->xmlChildrenNode->xmlChildrenNode->content;
char * strvalue = NULL;
if (child_node->xmlChildrenNode != NULL)
strvalue = (char *) child_node->xmlChildrenNode->xmlChildrenNode->xmlChildrenNode->content;
if (strvalue != NULL && strvalue[0] != '\0') {
st = str_replace (strvalue, "\"", "''");
clean_carrier(st); // we handle padding
Expand Down

0 comments on commit 7d76103

Please sign in to comment.