diff --git a/editor/libeditor/nsTableEditor.cpp b/editor/libeditor/nsTableEditor.cpp index 40549d64a90..cb706cc91a3 100644 --- a/editor/libeditor/nsTableEditor.cpp +++ b/editor/libeditor/nsTableEditor.cpp @@ -2724,8 +2724,10 @@ nsHTMLEditor::GetCellAt(nsIDOMElement* aTable, int32_t aRowIndex, int32_t aColIn } nsTableOuterFrame* tableFrame = GetTableFrame(aTable); - if (!tableFrame) - return NS_ERROR_FAILURE; + if (!tableFrame) { + *aCell = nullptr; + return NS_EDITOR_ELEMENT_NOT_FOUND; + } nsCOMPtr domCell = do_QueryInterface(tableFrame->GetCellAt(aRowIndex, aColIndex));