summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-08-12 12:08:39 +0000
committerJames Bursa <james@netsurf-browser.org>2004-08-12 12:08:39 +0000
commit0a93f2d264080b8c0c748cbe0477123a3eb4b62d (patch)
treec0e48dc9e5c7693ec8532b68d942ecd308627cca /riscos
parent5b49cca1e9916363ca25bde69f83bc50786efa00 (diff)
downloadnetsurf-0a93f2d264080b8c0c748cbe0477123a3eb4b62d.tar.gz
netsurf-0a93f2d264080b8c0c748cbe0477123a3eb4b62d.tar.bz2
[project @ 2004-08-12 12:08:39 by bursa]
Fix various history functions to check for history->current. svn path=/import/netsurf/; revision=1215
Diffstat (limited to 'riscos')
-rw-r--r--riscos/history.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/riscos/history.c b/riscos/history.c
index 057620b70..87e420015 100644
--- a/riscos/history.c
+++ b/riscos/history.c
@@ -203,7 +203,7 @@ void history_add(struct history *history, struct content *content, char *frag_id
void history_update(struct history *history, struct content *content)
{
- if (!history || !history->current->sprite_area)
+ if (!history || !history->current || !history->current->sprite_area)
return;
thumbnail_create(content, history->current->sprite_area,
@@ -595,7 +595,7 @@ struct history_entry * ro_gui_history_click_find(struct history_entry *he,
void history_back(struct browser_window *bw, struct history *history)
{
- if (!history || !history->current->back)
+ if (!history || !history->current || !history->current->back)
return;
history->current = history->current->back;
history_go(bw, history->current);
@@ -611,7 +611,7 @@ void history_back(struct browser_window *bw, struct history *history)
void history_forward(struct browser_window *bw, struct history *history)
{
- if (!history || !history->current->forward_pref)
+ if (!history || !history->current || !history->current->forward_pref)
return;
history->current = history->current->forward_pref;
history_go(bw, history->current);
@@ -626,7 +626,7 @@ void history_forward(struct browser_window *bw, struct history *history)
*/
bool history_back_available(struct history *history) {
- return (history && history->current->back);
+ return (history && history->current && history->current->back);
}
@@ -638,7 +638,7 @@ bool history_back_available(struct history *history) {
*/
bool history_forward_available(struct history *history) {
- return (history && history->current->forward_pref);
+ return (history && history->current && history->current->forward_pref);
}
/**