From 84e449502f51e192d337eb793946d5b03f4c6460 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Fri, 13 Apr 2018 20:57:00 +0200 Subject: moebius#76: JS - DOM - Selection API - crashes https://github.com/MoonchildProductions/moebius/pull/76 --- dom/base/nsRange.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dom/base') diff --git a/dom/base/nsRange.cpp b/dom/base/nsRange.cpp index 37ba147af..4b4ce7885 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); } } -- cgit v1.2.3