| Index: chrome/browser/policy/managed_bookmarks_policy_handler.cc
|
| diff --git a/chrome/browser/policy/managed_bookmarks_policy_handler.cc b/chrome/browser/policy/managed_bookmarks_policy_handler.cc
|
| index b112a0ccae13ec84808cf9216b52bec70aeea6ac..dd5fa8bec559ad4bb5e8cda9eaa41aad03e516ad 100644
|
| --- a/chrome/browser/policy/managed_bookmarks_policy_handler.cc
|
| +++ b/chrome/browser/policy/managed_bookmarks_policy_handler.cc
|
| @@ -51,8 +51,7 @@
|
| // Iterate over the list, and try to find the FolderName.
|
| for (const auto& el : list) {
|
| const base::DictionaryValue* dict = NULL;
|
| - if (!el.GetAsDictionary(&dict))
|
| - continue;
|
| + if (!el || !el->GetAsDictionary(&dict)) continue;
|
|
|
| std::string name;
|
| if (dict->GetString(ManagedBookmarksTracker::kFolderName, &name)) {
|
| @@ -69,7 +68,7 @@
|
| base::ListValue::iterator it = list->begin();
|
| while (it != list->end()) {
|
| base::DictionaryValue* dict = NULL;
|
| - if (!it->GetAsDictionary(&dict)) {
|
| + if (!*it || !(*it)->GetAsDictionary(&dict)) {
|
| it = list->Erase(it, NULL);
|
| continue;
|
| }
|
|
|