summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/expire_history_backend.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-26 21:08:55 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-26 21:08:55 +0000
commitb050fd311f697e8b1bee6406a48684fa25152e9d (patch)
tree3579d9f94e85ef0d513a052e0eb0779583c45980 /chrome/browser/history/expire_history_backend.cc
parentf3b308e596f55dc5e9f5a0d5c862c6b7ae7211fa (diff)
downloadchromium_src-b050fd311f697e8b1bee6406a48684fa25152e9d.zip
chromium_src-b050fd311f697e8b1bee6406a48684fa25152e9d.tar.gz
chromium_src-b050fd311f697e8b1bee6406a48684fa25152e9d.tar.bz2
Fixes possible crash in visitdb. As far as I can tell the archive_db_
is NULL, leading to this crash. BUG=8932 TEST=none Review URL: http://codereview.chromium.org/53112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12599 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/expire_history_backend.cc')
-rw-r--r--chrome/browser/history/expire_history_backend.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/history/expire_history_backend.cc b/chrome/browser/history/expire_history_backend.cc
index d66467b..145d9b6 100644
--- a/chrome/browser/history/expire_history_backend.cc
+++ b/chrome/browser/history/expire_history_backend.cc
@@ -367,6 +367,9 @@ void ExpireHistoryBackend::ExpireURLsForVisits(
void ExpireHistoryBackend::ArchiveURLsAndVisits(
const VisitVector& visits,
DeleteDependencies* dependencies) {
+ if (!archived_db_)
+ return;
+
// Make sure all unique URL rows are added to the dependency list and the
// archived database. We will also keep the mapping between the main DB URLID
// and the archived one.