Skip to content

Commit

Permalink
[gnc-dense-cal] avoid GTimer leak
Browse files Browse the repository at this point in the history
Not sure if this GTimer ever gets leaked, but at least this code is
now GTimer leak-free.
  • Loading branch information
christopherlam committed Sep 2, 2022
1 parent 1998ce2 commit efde151
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gnucash/gnome-utils/gnc-dense-cal.c
Expand Up @@ -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);
Expand Down

0 comments on commit efde151

Please sign in to comment.