From 94ea4f37e426fa02ec61beb306edd74d6f372f82 Mon Sep 17 00:00:00 2001 From: "wr%rosenauer.org" Date: Mon, 29 Jan 2007 16:04:18 +0000 Subject: [PATCH] Bug 368544 - don't try to send with empty URL, r=luser --- toolkit/airbag/client/crashreporter_win.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/toolkit/airbag/client/crashreporter_win.cpp b/toolkit/airbag/client/crashreporter_win.cpp index efd5cf12e70..8e7aacd27da 100644 --- a/toolkit/airbag/client/crashreporter_win.cpp +++ b/toolkit/airbag/client/crashreporter_win.cpp @@ -132,8 +132,6 @@ bool ReadConfig() wcscpy(s, L".ini"); GetPrivateProfileString(L"Settings", L"URL", L"", sendURL, 2048, fileName); - if (sendURL[0] == '\0') - return false; TCHAR tmp[16]; GetPrivateProfileString(L"Settings", L"Delete", L"1", tmp, 16, fileName); @@ -325,14 +323,20 @@ bool SendCrashReport(HINSTANCE hInstance, LPCTSTR dumpFile) DWORD WINAPI SendThreadProc(LPVOID param) { + bool finishedOk; SENDTHREADDATA* td = (SENDTHREADDATA*)param; //XXX: send some extra params? map params; wstring url(sendURL); - bool finishedOk = google_airbag::CrashReportSender - ::SendCrashReport(url, - params, - wstring(td->dumpFile)); + if (url.empty()) { + finishedOk = false; + } + else { + finishedOk = google_airbag::CrashReportSender + ::SendCrashReport(url, + params, + wstring(td->dumpFile)); + } PostMessage(td->hDlg, WM_UPLOADCOMPLETE, finishedOk ? 1 : 0, 0); delete td; return 0;