summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/events/ui_event.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/events/ui_event.c b/src/events/ui_event.c
index 4fac3b6..34ec84d 100644
--- a/src/events/ui_event.c
+++ b/src/events/ui_event.c
@@ -18,7 +18,7 @@ static struct dom_event_private_vtable _event_vtable = {
/* Constructor */
dom_exception _dom_ui_event_create(struct dom_ui_event **evt)
{
- *evt = malloc(sizeof(dom_ui_event));
+ *evt = calloc(1, sizeof(dom_ui_event));
if (*evt == NULL)
return DOM_NO_MEM_ERR;
@@ -38,7 +38,6 @@ void _dom_ui_event_destroy(struct dom_ui_event *evt)
/* Initialise function */
dom_exception _dom_ui_event_initialise(struct dom_ui_event *evt)
{
- evt->view = NULL;
return _dom_event_initialise(&evt->base);
}