Suggested by Darin.
[WebKit-https.git] / WebCore / khtml / html / HTMLElementImpl.cpp
index 1bbcf34265fb79cbdbd149f74a74022525fc4ae8..ecc9f9b39ab05ce47ffaeaf1ca2db022bd9569b1 100644 (file)
@@ -274,7 +274,7 @@ DocumentFragmentImpl *HTMLElementImpl::createContextualFragment(const DOMString
             NodeImpl *firstChild = node->firstChild();
             if (firstChild)
                 nextNode = firstChild;
-            NodeImpl *nextChild;
+            RefPtr<NodeImpl> nextChild;
             for (RefPtr<NodeImpl> child = firstChild; child; child = nextChild) {
                 nextChild = child->nextSibling();
                 node->removeChild(child.get(), ignoredExceptionCode);