diff options
Diffstat (limited to 'desktop/browser.c')
-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; |