| Index: chrome/browser/policy/policy_loader_win.cc
|
| diff --git a/chrome/browser/policy/policy_loader_win.cc b/chrome/browser/policy/policy_loader_win.cc
|
| index 36a44fea38450e53e1a55832ad4f4d7e2a503c2f..2f25fa56f409e9c64dda9993088cdc2ad94d256a 100644
|
| --- a/chrome/browser/policy/policy_loader_win.cc
|
| +++ b/chrome/browser/policy/policy_loader_win.cc
|
| @@ -88,9 +88,10 @@ bool LoadHighestPriorityKey(const string16& key_path,
|
| string16 path(kKeyPaths[k].path);
|
| if (!key_path.empty())
|
| path += kPathSep + key_path;
|
| - key->Open(kHives[h].hive, path.c_str(), KEY_READ);
|
| - if (!key->Valid())
|
| + if (key->Open(kHives[h].hive, path.c_str(), KEY_READ) != ERROR_SUCCESS ||
|
| + !key->Valid()) {
|
| continue;
|
| + }
|
| if (value_name.empty() || key->HasValue(value_name.c_str())) {
|
| *level = kKeyPaths[k].level;
|
| *scope = kHives[h].scope;
|
|
|