[yelp] [yelp-mallard-document] Don't double-add pages, also fixes #621398
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp] [yelp-mallard-document] Don't double-add pages, also fixes #621398
- Date: Sat, 26 Jun 2010 13:46:50 +0000 (UTC)
commit 4db5971d569b8c0daffaf491bb4c94d2cb90e4e2
Author: Shaun McCance <shaunm gnome org>
Date: Sat Jun 26 09:46:06 2010 -0400
[yelp-mallard-document] Don't double-add pages, also fixes #621398
libyelp/yelp-mallard-document.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libyelp/yelp-mallard-document.c b/libyelp/yelp-mallard-document.c
index 1676595..4141782 100644
--- a/libyelp/yelp-mallard-document.c
+++ b/libyelp/yelp-mallard-document.c
@@ -326,7 +326,11 @@ mallard_think (YelpMallardDocument *mallard)
mallard_page_data_walk (page_data);
if (page_data->page_id == NULL) {
mallard_page_data_free (page_data);
- } else {
+ }
+ else if (g_hash_table_lookup (priv->pages_hash, page_data->page_id) != NULL) {
+ mallard_page_data_free (page_data);
+ }
+ else {
g_mutex_lock (priv->mutex);
yelp_document_set_root_id ((YelpDocument *) mallard,
page_data->page_id, "index");
@@ -462,6 +466,8 @@ mallard_page_data_walk (MallardPageData *page_data)
id = xmlGetProp (page_data->cur, BAD_CAST "id");
if (id == NULL)
goto done;
+ if (g_hash_table_lookup (priv->pages_hash, id) != NULL)
+ goto done;
page_data->cache = xmlNewChild (page_data->cache,
priv->cache_ns,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]