Rob Shearman : mshtml: Check for the container' s doc being NULL in nsTooltipListener_OnShowTooltip and nsTooltipListener_OnHideTooltip .

Alexandre Julliard julliard at winehq.org
Sat Dec 27 13:45:28 CST 2008


Module: wine
Branch: master
Commit: 07e8ab45c96ac2387919674446252044c1e6c8c9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=07e8ab45c96ac2387919674446252044c1e6c8c9

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Sat Dec 27 17:28:42 2008 +0000

mshtml: Check for the container's doc being NULL in nsTooltipListener_OnShowTooltip and nsTooltipListener_OnHideTooltip.

They could be called after NSContainer_Release is called.

---

 dlls/mshtml/nsembed.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c
index a653e24..c7756ae 100644
--- a/dlls/mshtml/nsembed.c
+++ b/dlls/mshtml/nsembed.c
@@ -1496,7 +1496,8 @@ static nsresult NSAPI nsTooltipListener_OnShowTooltip(nsITooltipListener *iface,
 {
     NSContainer *This = NSTOOLTIP_THIS(iface);
 
-    show_tooltip(This->doc, aXCoord, aYCoord, aTipText);
+    if (This->doc)
+        show_tooltip(This->doc, aXCoord, aYCoord, aTipText);
 
     return NS_OK;
 }
@@ -1505,7 +1506,8 @@ static nsresult NSAPI nsTooltipListener_OnHideTooltip(nsITooltipListener *iface)
 {
     NSContainer *This = NSTOOLTIP_THIS(iface);
 
-    hide_tooltip(This->doc);
+    if (This->doc)
+        hide_tooltip(This->doc);
 
     return NS_OK;
 }




More information about the wine-cvs mailing list