From 9151b61ebd37e4ea0740a99e9455f55b41ec1553 Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk@fabiankeil.de>
Date: Thu, 9 Oct 2014 16:10:55 +0200
Subject: [PATCH] Revert "operate_do: skip superfluous check for NULL pointer"

Apparently the check isn't superfluous after all.
Gets test76 working again on FreeBSD.

This reverts commit 987a4a7367ac8df32628ba738342e2206582f1e7.
---
 src/tool_operate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tool_operate.c b/src/tool_operate.c
index fe54a34..6093a11 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -543,7 +543,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
             res = get_url_file_name(&outfile, this_url);
             if(res)
               goto show_error;
-            if(!*outfile && !config->content_disposition) {
+            if((!outfile || !*outfile) && !config->content_disposition) {
               helpf(global->errors, "Remote file name has no length!\n");
               res = CURLE_WRITE_ERROR;
               goto quit_urls;
-- 
1.9.0


