Bug 299419, crash [@ nsEventStateManager::FireContextClick]. Check for null pres shell. r+sr=roc

This commit is contained in:
mark%moxienet.com 2005-09-16 00:05:39 +00:00
Родитель f9cf533ed5
Коммит b0d475ff4b
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -1273,8 +1273,9 @@ nsEventStateManager::FireContextClick()
// when we're through because no one else is doing anything more with this
// event and it will get reset on the very next event to the correct frame).
mCurrentTarget = nsnull;
if ( mGestureDownContent ) {
mCurrentTarget = mPresContext->GetPresShell()->GetPrimaryFrameFor(mGestureDownFrameOwner);
nsIPresShell *shell = mPresContext->GetPresShell();
if ( shell ) {
mCurrentTarget = shell->GetPrimaryFrameFor(mGestureDownFrameOwner);
if ( mCurrentTarget ) {
SetFrameExternalReference(mCurrentTarget);