Index: src/plugin/PluginFilter.cpp |
=================================================================== |
--- a/src/plugin/PluginFilter.cpp |
+++ b/src/plugin/PluginFilter.cpp |
@@ -387,19 +387,20 @@ |
break; |
case ETraverserComplexType::TRAVERSER_TYPE_IMMEDIATE: |
hr = S_FALSE; |
- CComQIPtr<IHTMLDOMNode> pDomNode = pEl; |
- if (pDomNode) |
+ CComQIPtr<IHTMLDOMNode> pPrevSiblingNode = pEl; |
+ if (pPrevSiblingNode) |
{ |
- CComPtr<IHTMLDOMNode> pPrevSiblingNode = pDomNode; |
long type; |
do |
{ |
- pPrevSiblingNode->get_previousSibling(&pPrevSiblingNode); |
+ IHTMLDOMNode* tmpNode; |
+ pPrevSiblingNode->get_previousSibling(&tmpNode); |
+ pPrevSiblingNode.Attach(tmpNode); |
Wladimir Palant
2013/10/08 10:30:38
For reference: this is the only place that needed
|
if (pPrevSiblingNode) |
{ |
hr = pPrevSiblingNode->get_nodeType(&type); |
if (hr != S_OK) |
- pPrevSiblingNode = NULL; |
+ pPrevSiblingNode.Release(); |
} |
} while (pPrevSiblingNode && type != 1); |