Bug 853857 - Check the result of CrashReporter::CheckForLastRunCrash. r=ted
authorJim Mathies <jmathies@mozilla.com>
Fri, 21 Jun 2013 04:11:43 -0500
changeset 136085 3e3e6bbe62bb1c62cd8e93b6e09da895cd6599ed
parent 136084 363d2f3d3d85ff1375124d696ca2a882892535b2
child 136086 386301e2ee28dbdfc9ccc7645cc4235aef4d812d
push id29950
push usereakhgari@mozilla.com
push dateSat, 22 Jun 2013 12:47:22 +0000
treeherdermozilla-inbound@3e3e6bbe62bb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs853857
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 853857 - Check the result of CrashReporter::CheckForLastRunCrash. r=ted
toolkit/crashreporter/nsExceptionHandler.cpp
--- a/toolkit/crashreporter/nsExceptionHandler.cpp
+++ b/toolkit/crashreporter/nsExceptionHandler.cpp
@@ -2429,19 +2429,19 @@ CheckForLastRunCrash()
   // Ugly but effective.
   nsDependentString lastMinidump(
       reinterpret_cast<const PRUnichar*>(lastMinidump_contents.get()));
 #else
   nsAutoCString lastMinidump = lastMinidump_contents;
 #endif
   nsCOMPtr<nsIFile> lastMinidumpFile;
   CreateFileFromPath(lastMinidump.get(),
-                      getter_AddRefs(lastMinidumpFile));
-
-  if (NS_FAILED(lastMinidumpFile->Exists(&exists)) || !exists) {
+                     getter_AddRefs(lastMinidumpFile));
+
+  if (!lastMinidumpFile || NS_FAILED(lastMinidumpFile->Exists(&exists)) || !exists) {
     return false;
   }
 
   nsCOMPtr<nsIFile> lastExtraFile;
   if (!GetExtraFileForMinidump(lastMinidumpFile,
                                getter_AddRefs(lastExtraFile))) {
     return false;
   }