[gnc-dense-cal] avoid GTimer leak

Not sure if this GTimer ever gets leaked, but at least this code is
now GTimer leak-free.
This commit is contained in:
Christopher Lam 2022-09-02 20:50:08 +08:00
parent 1998ce2ada
commit efde151ad7

View File

@ -528,9 +528,10 @@ gnc_dense_cal_set_month(GncDenseCal *dcal, GDateMonth mon)
static void
_gnc_dense_cal_set_month(GncDenseCal *dcal, GDateMonth mon, gboolean redraw)
{
GTimer *t = g_timer_new();
GTimer *t;
if (dcal->month == mon)
return;
t = g_timer_new();
dcal->month = mon;
g_timer_start(t);
recompute_first_of_month_offset(dcal);