--- mozilla.orig/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp.orig 2010-04-02 11:59:10.000000000 -0400 +++ mozilla/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp 2010-05-14 12:37:22.000000000 -0400 @@ -3180,6 +3180,8 @@ { LOG(("nsUrlClassifierDBServiceWorker::ApplyUpdate")); + if (mConnection) { + if (NS_FAILED(mUpdateStatus)) { mConnection->RollbackTransaction(); } else { @@ -3189,6 +3191,8 @@ } } + } // mConnection + if (NS_SUCCEEDED(mUpdateStatus)) { // We have modified the db, we can't trust the set of clean // fragments or domains anymore. @@ -3222,7 +3226,8 @@ // We need to get the error code before ApplyUpdate, because it might // close/open the connection. PRInt32 errcode = SQLITE_OK; - mConnection->GetLastError(&errcode); + if (mConnection) + mConnection->GetLastError(&errcode); ApplyUpdate();