summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 19:38:51 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 19:38:51 +0000
commit7992883b810d2e6b1570ebc04a9049edab02e733 (patch)
tree912f9af0674267cb6817390febe9c7baf71d2061
parent62782a70b28d79931770b8a52ea96fcb141abff2 (diff)
downloadchromium_src-7992883b810d2e6b1570ebc04a9049edab02e733.zip
chromium_src-7992883b810d2e6b1570ebc04a9049edab02e733.tar.gz
chromium_src-7992883b810d2e6b1570ebc04a9049edab02e733.tar.bz2
Add a NULL check in syncable::Directory::TakeSnapshotForSaveChanges.
BUG=41994 TEST=none Review URL: http://codereview.chromium.org/1519039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45064 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/sync/syncable/syncable.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/browser/sync/syncable/syncable.cc b/chrome/browser/sync/syncable/syncable.cc
index 920090c..6bda2e5 100644
--- a/chrome/browser/sync/syncable/syncable.cc
+++ b/chrome/browser/sync/syncable/syncable.cc
@@ -511,6 +511,8 @@ void Directory::TakeSnapshotForSaveChanges(SaveChangesSnapshot* snapshot) {
for (MetahandleSet::const_iterator i = kernel_->dirty_metahandles->begin();
i != kernel_->dirty_metahandles->end(); ++i) {
EntryKernel* entry = GetEntryByHandle(*i, &lock);
+ if (!entry)
+ continue;
// Skip over false positives; it happens relatively infrequently.
if (!entry->is_dirty())
continue;