Bug 632504 - crash on shutdown [@ nsCharTraits<unsigned short>::length(unsigned short const*)] - [@ nsMsgShutdownService::Observe]; r=bienvenu
authorMark Banner <bugzilla@standard8.plus.com>
Wed, 09 Feb 2011 22:34:26 +0000
changeset 7117 e592a1db76523a566e97fcaf02153bac6eaec2b1
parent 7116 929e3d2b3fc8470deb52c8b707edb307418357f9
child 7118 33c7875eb77cda6eb7ce76778f3ab7d977b0c5f0
push idunknown
push userunknown
push dateunknown
reviewersbienvenu
bugs632504
Bug 632504 - crash on shutdown [@ nsCharTraits<unsigned short>::length(unsigned short const*)] - [@ nsMsgShutdownService::Observe]; r=bienvenu
mailnews/base/src/nsMsgMailSession.cpp
--- a/mailnews/base/src/nsMsgMailSession.cpp
+++ b/mailnews/base/src/nsMsgMailSession.cpp
@@ -724,17 +724,17 @@ NS_IMETHODIMP nsMsgShutdownService::Obse
     if (!mQuitForced)
     {
       nsCOMPtr<nsISupportsPRBool> stopShutdown = do_QueryInterface(aSubject);
       stopShutdown->SetData(PR_TRUE);
 
       // If the attempted quit was a restart, be sure to restart the app once
       // the tasks have been run. This is usually the case when addons or
       // updates are going to be installed.
-      if (nsDependentString(aData).EqualsLiteral("restart"))
+      if (aData && nsDependentString(aData).EqualsLiteral("restart"))
         mQuitMode |= nsIAppStartup::eRestart;
     }
 
     mMsgProgress->OpenProgressDialog(internalDomWin, topMsgWindow, 
                                      "chrome://messenger/content/shutdownWindow.xul", 
                                      PR_FALSE, nsnull);
 
     if (mQuitForced)