Bug 712937 - Null-check aRange. r=bzbarsky

This commit is contained in:
Mats Palmgren 2011-12-24 05:08:23 +01:00
parent 0fc5b748c2
commit 2ab972acef

View File

@ -4336,8 +4336,12 @@ nsTypedSelection::SelectAllFramesForContent(nsIContentIterator *aInnerIter,
nsresult
nsTypedSelection::selectFrames(nsPresContext* aPresContext, nsIRange *aRange, bool aFlags)
{
if (!mFrameSelection || !aPresContext || !aPresContext->GetPresShell())
if (!mFrameSelection || !aPresContext || !aPresContext->GetPresShell()) {
return NS_OK; // nothing to do
}
if (!aRange) {
return NS_ERROR_NULL_POINTER;
}
if (mFrameSelection->GetTableCellSelection()) {
nsINode* node = aRange->GetCommonAncestor();