diff options
author | Milan Crha <mcrha@redhat.com> | 2009-12-15 18:12:41 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-12-15 18:12:41 +0800 |
commit | 859c8b5a8fae36bdb615f35f792c8256d4c8f97e (patch) | |
tree | 020d25459a72882a3406d3f4f28641e72e9ceda9 /modules/calendar | |
parent | c0c247128c71653e38c6a5de900a069e13a53d8e (diff) | |
download | gsoc2013-evolution-859c8b5a8fae36bdb615f35f792c8256d4c8f97e.tar gsoc2013-evolution-859c8b5a8fae36bdb615f35f792c8256d4c8f97e.tar.gz gsoc2013-evolution-859c8b5a8fae36bdb615f35f792c8256d4c8f97e.tar.bz2 gsoc2013-evolution-859c8b5a8fae36bdb615f35f792c8256d4c8f97e.tar.lz gsoc2013-evolution-859c8b5a8fae36bdb615f35f792c8256d4c8f97e.tar.xz gsoc2013-evolution-859c8b5a8fae36bdb615f35f792c8256d4c8f97e.tar.zst gsoc2013-evolution-859c8b5a8fae36bdb615f35f792c8256d4c8f97e.zip |
Bug #603342 - Memory leak fixes
Diffstat (limited to 'modules/calendar')
-rw-r--r-- | modules/calendar/e-cal-shell-view-private.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c index 4aa9d00436..46cb825d21 100644 --- a/modules/calendar/e-cal-shell-view-private.c +++ b/modules/calendar/e-cal-shell-view-private.c @@ -851,8 +851,8 @@ e_cal_shell_view_update_sidebar (ECalShellView *cal_shell_view) struct tm start_tm, end_tm; struct icaltimetype start_tt, end_tt; icaltimezone *timezone; - gchar buffer[512]; - gchar end_buffer[512]; + gchar buffer[512] = { 0 }; + gchar end_buffer[512] = { 0 }; g_return_if_fail (E_IS_CAL_SHELL_VIEW (cal_shell_view)); @@ -868,8 +868,10 @@ e_cal_shell_view_update_sidebar (ECalShellView *cal_shell_view) view_type = gnome_calendar_get_view (calendar); calendar_view = gnome_calendar_get_calendar_view (calendar, view_type); - e_calendar_view_get_visible_time_range ( - calendar_view, &start_time, &end_time); + if (!e_calendar_view_get_visible_time_range (calendar_view, &start_time, &end_time)) { + e_shell_sidebar_set_secondary_text (shell_sidebar, ""); + return; + } start_tt = icaltime_from_timet_with_zone (start_time, FALSE, timezone); start_tm.tm_year = start_tt.year - 1900; |