summaryrefslogtreecommitdiff
path: root/dom/base/nsRange.cpp
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-13 20:57:00 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-13 20:57:00 +0200
commit84e449502f51e192d337eb793946d5b03f4c6460 (patch)
treefef676db7fef06f09032e64e74ac04c5ead481e3 /dom/base/nsRange.cpp
parent314016db7f55d24ad9d23197ca56462e78bc9ecc (diff)
downloaduxp-84e449502f51e192d337eb793946d5b03f4c6460.tar.gz
moebius#76: JS - DOM - Selection API - crashes
https://github.com/MoonchildProductions/moebius/pull/76
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);
}
}