[mac] Fixed crash in My Position http request

This commit is contained in:
Alex Zolotarev 2011-10-28 20:54:11 +03:00 committed by Alex Zolotarev
parent 71ec412788
commit a6bc3ad0a1

View file

@ -180,7 +180,7 @@ static bool NeedToGenerateUrl(string const & url)
m_projectedFileSize = [response expectedContentLength];
// if server doesn't support resume, make sure we're downloading file from scratch
if (m_projectedFileSize < 0)
if (!m_params.m_fileToSave.empty() && m_projectedFileSize < 0)
{
fclose(m_file);
m_file = fopen((m_params.m_fileToSave + DOWNLOADING_FILE_EXTENSION).c_str(), "wb");