Have is<>(T*) function do a null check on the pointer argument
[WebKit-https.git] / Source / WebCore / dom / CurrentScriptIncrementer.h
index bd7de07..a3cf8f4 100644 (file)
@@ -39,7 +39,7 @@ class CurrentScriptIncrementer {
 public:
     CurrentScriptIncrementer(Document* document, Element* element)
         : m_document(document)
-        , m_isHTMLScriptElement(is<HTMLScriptElement>(element))
+        , m_isHTMLScriptElement(is<HTMLScriptElement>(*element))
     {
         if (m_isHTMLScriptElement)
             m_document->pushCurrentScript(downcast<HTMLScriptElement>(element));