| Index: Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| diff --git a/Source/core/inspector/InspectorLayerTreeAgent.cpp b/Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| index 822b43720bcc4fd8db140b863da31498c1ff7071..88d9a0da8e9ce4473a29bf6f7760164b2f3f3943 100644
|
| --- a/Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| +++ b/Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| @@ -367,9 +367,14 @@ void InspectorLayerTreeAgent::loadSnapshot(ErrorString* errorString, const RefPt
|
| }
|
| RefPtr<PictureSnapshot> snapshot = PictureSnapshot::load(decodedTiles);
|
| if (!snapshot) {
|
| - *errorString = "Invalida snapshot format";
|
| + *errorString = "Invalid snapshot format";
|
| return;
|
| }
|
| + if (snapshot->isEmpty()) {
|
| + *errorString = "Empty snapshot";
|
| + return;
|
| + }
|
| +
|
| *snapshotId = String::number(++s_lastSnapshotId);
|
| bool newEntry = m_snapshotById.add(*snapshotId, snapshot).isNewEntry;
|
| ASSERT_UNUSED(newEntry, newEntry);
|
|
|