diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | embed/mozilla/StartHereProtocolHandler.cpp | 1 | ||||
-rw-r--r-- | lib/ephy-start-here.c | 1 |
3 files changed, 9 insertions, 0 deletions
@@ -1,5 +1,12 @@ 2003-02-04 Marco Pesenti Gritti <marco@it.gnome.org> + * embed/mozilla/StartHereProtocolHandler.cpp: + * lib/ephy-start-here.c: (ephy_start_here_get_page): + + Dont crash when going to a not existent page. + +2003-02-04 Marco Pesenti Gritti <marco@it.gnome.org> + * lib/widgets/ephy-editable-toolbar.c: (item_node_new), (connect_drag_sources), (disconnect_drag_sources), (setup_toolbars), (do_merge), (ephy_editable_toolbar_init), diff --git a/embed/mozilla/StartHereProtocolHandler.cpp b/embed/mozilla/StartHereProtocolHandler.cpp index 369b9123d..52235ab00 100644 --- a/embed/mozilla/StartHereProtocolHandler.cpp +++ b/embed/mozilla/StartHereProtocolHandler.cpp @@ -149,6 +149,7 @@ NS_IMETHODIMP GStartHereProtocolHandler::NewChannel(nsIURI *aURI, sh = ephy_start_here_new (); buf = ephy_start_here_get_page (sh, path.IsEmpty() ? "index" : path.get ()); + if (buf == NULL) return NS_ERROR_FAILURE; aBaseURI = ephy_start_here_get_base_uri (sh); rv = stream->Write (buf, strlen (buf), &bytesWritten); diff --git a/lib/ephy-start-here.c b/lib/ephy-start-here.c index 030b5d5f6..40b23c452 100644 --- a/lib/ephy-start-here.c +++ b/lib/ephy-start-here.c @@ -274,6 +274,7 @@ ephy_start_here_get_page (EphyStartHere *sh, const char *id) xml_filename = g_strconcat ("starthere/", id, ".xml", NULL); xml_filepath = ephy_file (xml_filename); + if (!xml_filepath) return NULL; g_free (xml_filename); sh->priv->doc = xmlParseFile (xml_filepath); |