diff options
author | Mikael Hallendal <micke@codefactory.se> | 2002-05-07 17:31:55 +0000 |
---|---|---|
committer | Mikael Hallendal <hallski@src.gnome.org> | 2002-05-07 17:31:55 +0000 |
commit | 4b5c5ebf75c729674e11bacdda967c5d51a94c9b (patch) | |
tree | 2549917956b92fd164bd52042e45c4c843276c7b | |
parent | 416f2da4816d7b99c5c9267f55880df8075c2ff3 (diff) | |
download | yelp-4b5c5ebf75c729674e11bacdda967c5d51a94c9b.tar.gz |
check if name == NULL, hopefully fixes #80981.
2002-05-07 Mikael Hallendal <micke@codefactory.se>
* src/yelp-section.c (yelp_section_new): check if name == NULL,
hopefully fixes #80981.
* src/yelp-scrollkeeper.c:
(ys_parse_index_item): reverted my own stupidity.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/yelp-scrollkeeper.c | 38 | ||||
-rw-r--r-- | src/yelp-section.c | 8 |
3 files changed, 34 insertions, 20 deletions
@@ -1,3 +1,11 @@ +2002-05-07 Mikael Hallendal <micke@codefactory.se> + + * src/yelp-section.c (yelp_section_new): check if name == NULL, + hopefully fixes #80981. + + * src/yelp-scrollkeeper.c: + (ys_parse_index_item): reverted my own stupidity. + 2002-05-06 Sander Vesik <sander.vesik@sun.com> * stylesheet/yelp-customization.xsl: diff --git a/src/yelp-scrollkeeper.c b/src/yelp-scrollkeeper.c index 18cbc122..c662a267 100644 --- a/src/yelp-scrollkeeper.c +++ b/src/yelp-scrollkeeper.c @@ -484,27 +484,27 @@ ys_parse_index_item (GList **index, YelpSection *section, xmlNode *node) else if (!g_ascii_strcasecmp (cur->name, "indexitem")) { ys_parse_index_item (index, section, cur); } + } - if (title && link) { - YelpURI *uri; - YelpSection *index_section; + if (title && link) { + YelpURI *uri; + YelpSection *index_section; - uri = yelp_uri_get_relative (section->uri, link); - - d(g_print ("%s\n", yelp_uri_to_string (uri))); - - index_section = yelp_section_new (YELP_SECTION_INDEX, - title, uri); - - yelp_uri_unref (uri); - - *index = g_list_prepend (*index, index_section); - - g_free (title); - g_free (link); - - title = link = NULL; - } + uri = yelp_uri_get_relative (section->uri, link); + + d(g_print ("%s\n", yelp_uri_to_string (uri))); + + index_section = yelp_section_new (YELP_SECTION_INDEX, + title, uri); + + yelp_uri_unref (uri); + + *index = g_list_prepend (*index, index_section); + + g_free (title); + g_free (link); + + title = link = NULL; } } diff --git a/src/yelp-section.c b/src/yelp-section.c index 357d586e..14e5ce29 100644 --- a/src/yelp-section.c +++ b/src/yelp-section.c @@ -37,7 +37,13 @@ yelp_section_new (YelpSectionType type, section = g_new0 (YelpSection, 1); section->type = type; - section->name = g_strdup (name); + + if (name) { + section->name = g_strdup (name); + } else { + section->name = g_strdup (""); + } + if (uri) { section->uri = yelp_uri_ref (uri); } else { |