summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2019-10-11 00:40:12 +0300
committerdefanor <defanor@uberspace.net>2019-10-11 00:40:12 +0300
commitc1456ab4762a8e3c83dc360d8ff629d4f8ad3d33 (patch)
tree2e1f3b70da6e9b75159d85b0a131772ec58aefc1
parent6030109eb4e52adf8a1827d4e9292695a2a0884f (diff)
downloadwwwlite-c1456ab4762a8e3c83dc360d8ff629d4f8ad3d33.zip
wwwlite-c1456ab4762a8e3c83dc360d8ff629d4f8ad3d33.tar.gz
wwwlite-c1456ab4762a8e3c83dc360d8ff629d4f8ad3d33.tar.bz2
Handle connection failures
-rw-r--r--src/browserbox.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/browserbox.c b/src/browserbox.c
index 555fd96..812ab4c 100644
--- a/src/browserbox.c
+++ b/src/browserbox.c
@@ -1248,7 +1248,8 @@ void document_loaded(SoupSession *session,
{
BrowserBox *bb = ptr;
BuilderState *bs = bb->builder_state;
- if (! bs->active) {
+ if (bs == NULL || bs->active == FALSE) {
+ browser_box_set_status(bb, "Failed to load the document");
return;
}
htmlParseChunk(bs->parser, "", 0, 1);