moebius#76: JS - DOM - Selection API - crashes

https://github.com/MoonchildProductions/moebius/pull/76
This commit is contained in:
janekptacijarabaci 2018-04-13 20:57:00 +02:00 committed by Roy Tam
commit 81228c3a44
3 changed files with 24 additions and 1 deletions

View file

@ -3194,7 +3194,7 @@ nsRange::AutoInvalidateSelection::~AutoInvalidateSelection()
mIsNested = false;
::InvalidateAllFrames(mCommonAncestor);
nsINode* commonAncestor = mRange->GetRegisteredCommonAncestor();
if (commonAncestor != mCommonAncestor) {
if (commonAncestor && commonAncestor != mCommonAncestor) {
::InvalidateAllFrames(commonAncestor);
}
}