diff options
Diffstat (limited to 'editor/libeditor/HTMLEditor.cpp')
-rw-r--r-- | editor/libeditor/HTMLEditor.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/editor/libeditor/HTMLEditor.cpp b/editor/libeditor/HTMLEditor.cpp index e9ea8887b7..fc88c79477 100644 --- a/editor/libeditor/HTMLEditor.cpp +++ b/editor/libeditor/HTMLEditor.cpp @@ -3773,10 +3773,14 @@ nsresult HTMLEditor::InsertLinkAroundSelectionAsAction( return EditorBase::ToGenericNSResult(rv); } - nsAutoString href; - anchor->GetHref(href); - if (href.IsEmpty()) { - return NS_OK; + // XXX Is this ok? Does this just want to check that we're a link? If so + // there are faster ways to do this. + { + nsAutoCString href; + anchor->GetHref(href); + if (href.IsEmpty()) { + return NS_OK; + } } AutoPlaceholderBatch treatAsOneTransaction( |