mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 917515 - Check for null before checking the document. r=ehsan
This commit is contained in:
parent
c72a9507ac
commit
919570efe5
@ -4383,7 +4383,7 @@ Selection::Collapse(nsINode* aParentNode, int32_t aOffset)
|
||||
nsresult result;
|
||||
|
||||
nsRefPtr<nsPresContext> presContext = GetPresContext();
|
||||
if (presContext->Document() != aParentNode->OwnerDoc())
|
||||
if (!presContext || presContext->Document() != aParentNode->OwnerDoc())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// Delete all of the current ranges
|
||||
@ -4624,7 +4624,7 @@ Selection::Extend(nsINode* aParentNode, int32_t aOffset)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsRefPtr<nsPresContext> presContext = GetPresContext();
|
||||
if (presContext->Document() != aParentNode->OwnerDoc())
|
||||
if (!presContext || presContext->Document() != aParentNode->OwnerDoc())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
//mFrameSelection->InvalidateDesiredX();
|
||||
|
Loading…
Reference in New Issue
Block a user