aboutsummaryrefslogtreecommitdiff
path: root/src/html.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/html.cc')
-rw-r--r--src/html.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/html.cc b/src/html.cc
index a2869193..7d5f7f03 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -4356,7 +4356,7 @@ void a_Html_form_event_handler(void *data, form::Form *form_receiver,
{
int form_index, input_idx = -1, idx;
DilloHtmlForm *form = NULL;
- DilloHtmlInput *input;
+ DilloHtmlInput *input = NULL;
DilloHtml *html = (DilloHtml*)data;
MSG("Html_form_event_handler %p %p\n", html, form_receiver);
@@ -4377,7 +4377,7 @@ void a_Html_form_event_handler(void *data, form::Form *form_receiver,
break;
}
}
- if (form_index == html->forms->size()) {
+ if (!input) {
MSG("a_Html_form_event_handler: ERROR, form not found!\n");
} else if (input->type == DILLO_HTML_INPUT_FILE) {
/* read the file into cache */