Bug 444466 – Crash [@ nsTextControlFrame::PreDestroy()], r+sr=bz

This commit is contained in:
neil@parkwaycc.co.uk 2008-07-12 11:26:40 +02:00
parent 6f0fa2d6a8
commit 64491786fd

View File

@ -1131,10 +1131,10 @@ nsTextControlFrame::PreDestroy()
}
//unregister self from content
mTextListener->SetFrame(nsnull);
nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), PR_FALSE);
if (mTextListener)
{
mTextListener->SetFrame(nsnull);
if (mContent)
{
mContent->RemoveEventListenerByIID(static_cast<nsIDOMFocusListener *>(mTextListener), NS_GET_IID(nsIDOMFocusListener));