Bug 375093, Crash [@ nsTypedSelection::ScrollIntoView] when right-clicking paste in input which then gets destroyed oninput, r+sr=dbaron

This commit is contained in:
Olli.Pettay@helsinki.fi 2007-03-23 10:32:34 -07:00
parent ce0ff9015a
commit 1e619f723b

View File

@ -7287,7 +7287,7 @@ nsTypedSelection::ScrollIntoView(SelectionRegion aRegion, PRBool aIsSynchronous)
//
nsCOMPtr<nsIPresShell> presShell;
result = GetPresShell(getter_AddRefs(presShell));
if (NS_FAILED(result))
if (NS_FAILED(result) || !presShell)
return result;
nsCOMPtr<nsICaret> caret;
presShell->GetCaret(getter_AddRefs(caret));