Have is<>(T*) function do a null check on the pointer argument
[WebKit-https.git] / Source / WebCore / loader / FormSubmission.cpp
index a97fd84..42343b2 100644 (file)
@@ -144,7 +144,7 @@ PassRefPtr<FormSubmission> FormSubmission::create(HTMLFormElement* form, const A
     HTMLFormControlElement* submitButton = 0;
     if (event && event->target()) {
         for (Node* node = event->target()->toNode(); node; node = node->parentNode()) {
-            if (is<HTMLFormControlElement>(node)) {
+            if (is<HTMLFormControlElement>(*node)) {
                 submitButton = downcast<HTMLFormControlElement>(node);
                 break;
             }