diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-02-27 18:38:41 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-02-27 18:38:41 +0000 |
commit | 89793c21712fe11a1c52452911f12ac38e275d28 (patch) | |
tree | d054315208d4512c64c71e30e72079e5d8984a9e /desktop | |
parent | 748937547a27e58979c2c8385dd9aec5e62aa9da (diff) | |
download | netsurf-89793c21712fe11a1c52452911f12ac38e275d28.tar.gz netsurf-89793c21712fe11a1c52452911f12ac38e275d28.tar.bz2 |
Make content_reset actually do what it's meant to (i.e. reset the appropriate members)
Fix up CONTENT_MSG_REFRESH scheduled events to gracefully the refresh URL disappearing from under them.
svn path=/trunk/netsurf/; revision=3870
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/browser.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/desktop/browser.c b/desktop/browser.c index 27fcd6ad1..ee3e7eed5 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -648,8 +648,14 @@ void browser_window_refresh(void *p) struct browser_window *bw = p; bool history_add = true; - assert(bw->current_content->status == CONTENT_STATUS_READY || - bw->current_content->status == CONTENT_STATUS_DONE); + assert(bw->current_content && + (bw->current_content->status == CONTENT_STATUS_READY || + bw->current_content->status == CONTENT_STATUS_DONE)); + + /* Ignore if the refresh URL has gone + * (may happen if a fetch error occurred) */ + if (!bw->current_content->refresh) + return; /* mark this content as invalid so it gets flushed from the cache */ bw->current_content->fresh = false; |