From: Greg Kroah-Hartman Date: Fri, 18 Feb 2011 23:47:29 +0000 (-0800) Subject: Merge branch 'fix-segfault-invalid-host' of https://github.com/agimenez/bti into... X-Git-Url: https://git.toastfreeware.priv.at/gregoa/bti.git/commitdiff_plain/0b6b14f8523b6d14af373ce66e610093b2297dc8?hp=83a2cb0426a17e6eb3d28a335470b877d0a3ce98 Merge branch 'fix-segfault-invalid-host' of https://github.com/agimenez/bti into agimenez-fix-segfault-invalid-host --- diff --git a/bti.c b/bti.c index 93b32a3..9fb5f54 100644 --- a/bti.c +++ b/bti.c @@ -724,6 +724,11 @@ static int send_request(struct session *session) free(req_url); } + if (!reply) { + fprintf(stderr, "Error retrieving from URL (%s)\n", endpoint); + return 1; + } + if ((session->action != ACTION_UPDATE) && (session->action != ACTION_RETWEET)) parse_timeline(reply, session);