From 5622b13c23c79150d39133d38f27b707a06c171b Mon Sep 17 00:00:00 2001 From: cody271 Date: Mon, 16 Apr 2018 17:49:08 -0700 Subject: [PATCH] uiTimer() Use uiNew() and uiFree() --- unix/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/main.c b/unix/main.c index ec3182db..5ec95b56 100644 --- a/unix/main.c +++ b/unix/main.c @@ -119,7 +119,7 @@ static gboolean dotimer(gpointer data) if((*(t->f))(t->data)) return TRUE; else { - g_free(t); + uiFree(t); return FALSE; } } @@ -128,7 +128,7 @@ void uiTimer(int milliseconds, int (*f)(void *data), void *data) { struct timer *t; - t = g_new0(struct timer, 1); + t = uiNew(struct timer); t->f = f; t->data = data; g_timeout_add(milliseconds, dotimer, t);