summaryrefslogtreecommitdiff
path: root/dom/base/nsRange.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/nsRange.cpp')
-rw-r--r--dom/base/nsRange.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/dom/base/nsRange.cpp b/dom/base/nsRange.cpp
index 37ba147afc..4b4ce78857 100644
--- a/dom/base/nsRange.cpp
+++ b/dom/base/nsRange.cpp
@@ -3194,7 +3194,7 @@ nsRange::AutoInvalidateSelection::~AutoInvalidateSelection()
mIsNested = false;
::InvalidateAllFrames(mCommonAncestor);
nsINode* commonAncestor = mRange->GetRegisteredCommonAncestor();
- if (commonAncestor != mCommonAncestor) {
+ if (commonAncestor && commonAncestor != mCommonAncestor) {
::InvalidateAllFrames(commonAncestor);
}
}