mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
fix: potential devtools crash on empty (#49490)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -830,7 +830,9 @@ gin_helper::Dictionary TraceKeyPath(const gin_helper::Dictionary& start,
|
||||
const std::vector<std::string>& key_path) {
|
||||
gin_helper::Dictionary current = start;
|
||||
for (size_t i = 0; i < key_path.size() - 1; i++) {
|
||||
CHECK(current.Get(key_path[i], ¤t));
|
||||
CHECK(current.Get(key_path[i], ¤t))
|
||||
<< "Failed to get property '" << key_path[i] << "' at index " << i
|
||||
<< " in key path";
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user