diff options
Diffstat (limited to 'debug/netsurfd.c')
-rw-r--r-- | debug/netsurfd.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/debug/netsurfd.c b/debug/netsurfd.c index c5ad28e9d..f73e44954 100644 --- a/debug/netsurfd.c +++ b/debug/netsurfd.c @@ -40,10 +40,14 @@ int main(int argc, char *argv[]) puts("=== URL:"); gets(url); c = fetchcache(url, 0, callback, 0, 0, 100, 1000); - done = c->status == CONTENT_STATUS_DONE; - while (!done) - fetch_poll(); - puts("=== SUCCESS, dumping cache"); + if (c) { + done = c->status == CONTENT_STATUS_DONE; + while (!done) + fetch_poll(); + puts("=== SUCCESS, dumping cache"); + } else { + puts("=== FAILURE, dumping cache"); + } cache_dump(); content_remove_user(c, callback, 0, 0); } |