diff --git a/content/xbl/src/nsXBLWindowHandler.cpp b/content/xbl/src/nsXBLWindowHandler.cpp index 049b987c6f4..8f1d8fb90f6 100644 --- a/content/xbl/src/nsXBLWindowHandler.cpp +++ b/content/xbl/src/nsXBLWindowHandler.cpp @@ -82,8 +82,10 @@ nsXBLWindowHandler :: nsXBLWindowHandler (nsIDOMElement* aElement, nsIDOMEventRe nsXBLWindowHandler :: ~nsXBLWindowHandler ( ) { --sRefCnt; - if ( !sRefCnt ) + if ( !sRefCnt ) { delete sXBLSpecialDocInfo; + sXBLSpecialDocInfo = nsnull; + } } diff --git a/layout/xbl/src/nsXBLWindowHandler.cpp b/layout/xbl/src/nsXBLWindowHandler.cpp index 049b987c6f4..8f1d8fb90f6 100644 --- a/layout/xbl/src/nsXBLWindowHandler.cpp +++ b/layout/xbl/src/nsXBLWindowHandler.cpp @@ -82,8 +82,10 @@ nsXBLWindowHandler :: nsXBLWindowHandler (nsIDOMElement* aElement, nsIDOMEventRe nsXBLWindowHandler :: ~nsXBLWindowHandler ( ) { --sRefCnt; - if ( !sRefCnt ) + if ( !sRefCnt ) { delete sXBLSpecialDocInfo; + sXBLSpecialDocInfo = nsnull; + } }