diff options
author | Brent Smith <gnome@nextreality.net> | 2006-02-04 15:53:40 +0000 |
---|---|---|
committer | Brent Smith <bmsmith@src.gnome.org> | 2006-02-04 15:53:40 +0000 |
commit | d41ab13c71040428efc1b241077d54f764c9ca83 (patch) | |
tree | 542770e6795c0bcf6519cfa4bb3b9a87364f3958 | |
parent | 523f74d7cc49d5b8988a225e4c8eae8e26f1d0b6 (diff) | |
download | yelp-d41ab13c71040428efc1b241077d54f764c9ca83.tar.gz |
Fixed a bug with malformed documents which caused a crash.
2006-02-04 Brent Smith <gnome@nextreality.net>
* src/yelp-window.c: (pager_page_cb):
Fixed a bug with malformed documents which caused a crash.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/yelp-window.c | 15 |
2 files changed, 17 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2006-02-04 Brent Smith <gnome@nextreality.net> + + * src/yelp-window.c: (pager_page_cb): + Fixed a bug with malformed documents which caused a crash. + 2006-02-02 Brent Smith <gnome@nextreality.net> * src/yelp-main.c: (main_start): diff --git a/src/yelp-window.c b/src/yelp-window.c index 4e149d8c..547e4db8 100644 --- a/src/yelp-window.c +++ b/src/yelp-window.c @@ -1784,10 +1784,19 @@ pager_page_cb (YelpPager *pager, if (yelp_pager_page_contains_frag (pager, page_id, window->priv->current_frag)) { - window_disconnect (window); - page = (YelpPage *) yelp_pager_get_page (pager, page_id); - window_handle_page (window, page); + + /* now that yelp automatically inserts the id="index" attribute + * on the root element of a document, the _contains_frag function + * is no longer a good indication of whether a section exists. + * Therefore if the returned page is NULL, then the stylesheets + * were not able to create a "page" from this document through the + * exsl:document extension (see yelp_xslt_document()) + * -Brent Smith, 1/4/2006 */ + if (page) { + window_disconnect (window); + window_handle_page (window, page); + } } } |