Index: Source/core/editing/EditorCommand.cpp |
diff --git a/Source/core/editing/EditorCommand.cpp b/Source/core/editing/EditorCommand.cpp |
index 1c6a0169c29b4987bf855723dabc989f8a594688..f098e7b1cf878c4c40b7621d6dec4d87a33280eb 100644 |
--- a/Source/core/editing/EditorCommand.cpp |
+++ b/Source/core/editing/EditorCommand.cpp |
@@ -199,7 +199,8 @@ static bool executeInsertFragment(Frame& frame, PassRefPtr<DocumentFragment> fra |
static bool executeInsertNode(Frame& frame, PassRefPtr<Node> content) |
{ |
- RefPtr<DocumentFragment> fragment = DocumentFragment::create(frame.document()); |
+ ASSERT(frame.document()); |
+ RefPtr<DocumentFragment> fragment = DocumentFragment::create(*frame.document()); |
TrackExceptionState es; |
fragment->appendChild(content, es); |
if (es.hadException()) |
@@ -503,7 +504,8 @@ static bool executeInsertHorizontalRule(Frame& frame, Event*, EditorCommandSourc |
static bool executeInsertHTML(Frame& frame, Event*, EditorCommandSource, const String& value) |
{ |
- return executeInsertFragment(frame, createFragmentFromMarkup(frame.document(), value, "")); |
+ ASSERT(frame.document()); |
+ return executeInsertFragment(frame, createFragmentFromMarkup(*frame.document(), value, "")); |
} |
static bool executeInsertImage(Frame& frame, Event*, EditorCommandSource, const String& value) |