diff --git a/toolkit/crashreporter/nsExceptionHandler.cpp b/toolkit/crashreporter/nsExceptionHandler.cpp index f532d1a269ac..b4fff2037cd9 100644 --- a/toolkit/crashreporter/nsExceptionHandler.cpp +++ b/toolkit/crashreporter/nsExceptionHandler.cpp @@ -1707,6 +1707,10 @@ GetPendingDir(nsIFile** dir) } nsCOMPtr pending = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID); + if (!pending) { + NS_WARNING("Can't set up pending directory during shutdown."); + return false; + } #ifdef XP_WIN pending->InitWithPath(nsDependentString(pendingDirectory)); #else