| Index: third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| diff --git a/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| index b5efd8f4c2ab2b5305f4b89571e55755193a9b90..bbf09f9f940d466698cc8ffc6f08737c3e0735ae 100644
|
| --- a/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| @@ -335,7 +335,12 @@ void InspectorLayerTreeAgent::makeSnapshot(ErrorString* errorString, const Strin
|
| GraphicsContext context(layer->getPaintController());
|
| context.beginRecording(interestRect);
|
| layer->getPaintController().paintArtifact().replay(context);
|
| - RefPtr<PictureSnapshot> snapshot = adoptRef(new PictureSnapshot(context.endRecording()));
|
| +
|
| + RefPtr<const SkPicture> recording = context.endRecording();
|
| + if (!recording)
|
| + return;
|
| +
|
| + RefPtr<PictureSnapshot> snapshot = adoptRef(new PictureSnapshot(recording));
|
|
|
| *snapshotId = String::number(++s_lastSnapshotId);
|
| bool newEntry = m_snapshotById.add(*snapshotId, snapshot).isNewEntry;
|
|
|