diff options
author | Milan Crha <mcrha@redhat.com> | 2010-11-02 18:16:48 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-11-02 18:17:51 +0800 |
commit | c2b2e863cb97b6203b1be955a52096166462da8e (patch) | |
tree | 6cfccc1851f2e3efc94d56f6c887c3f6d1f4da8d /calendar | |
parent | ab652afc604c95992ad3d27f18a7d02fd99946da (diff) | |
download | gsoc2013-evolution-c2b2e863cb97b6203b1be955a52096166462da8e.tar gsoc2013-evolution-c2b2e863cb97b6203b1be955a52096166462da8e.tar.gz gsoc2013-evolution-c2b2e863cb97b6203b1be955a52096166462da8e.tar.bz2 gsoc2013-evolution-c2b2e863cb97b6203b1be955a52096166462da8e.tar.lz gsoc2013-evolution-c2b2e863cb97b6203b1be955a52096166462da8e.tar.xz gsoc2013-evolution-c2b2e863cb97b6203b1be955a52096166462da8e.tar.zst gsoc2013-evolution-c2b2e863cb97b6203b1be955a52096166462da8e.zip |
Add forgotten cairo_destroy() calls
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/gui/e-day-view-main-item.c | 8 | ||||
-rw-r--r-- | calendar/gui/e-day-view-top-item.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c index 366062f36f..08793c9c53 100644 --- a/calendar/gui/e-day-view-main-item.c +++ b/calendar/gui/e-day-view-main-item.c @@ -251,14 +251,18 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item, font_options = get_font_options (); - if (!is_array_index_in_bounds (day_view->events[day], event_num)) + if (!is_array_index_in_bounds (day_view->events[day], event_num)) { + cairo_destroy (cr); return; + } event = &g_array_index (day_view->events[day], EDayViewEvent, event_num); - if (!is_comp_data_valid (event)) + if (!is_comp_data_valid (event)) { + cairo_destroy (cr); return; + } /* Fill in the event background. Note that for events in the first column of the day, we might not want to paint over the vertical bar, diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index fffb6141eb..1703467840 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -76,8 +76,6 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item, gint c1, c2; cairo_t *cr; - cr = gdk_cairo_create (drawable); - day_view = e_day_view_top_item_get_day_view (top_item); points[0].x = x; @@ -102,6 +100,8 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item, if (!is_comp_data_valid (event)) return; + cr = gdk_cairo_create (drawable); + cairo_save (cr); /* Fill it in. */ if (gdk_color_parse ( @@ -181,8 +181,6 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item, day_view = e_day_view_top_item_get_day_view (top_item); model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)); - cr = gdk_cairo_create (drawable); - gradient = calendar_config_get_display_events_gradient (); alpha = calendar_config_get_display_events_alpha (); @@ -207,6 +205,8 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item, if (!is_comp_data_valid (event)) return; + cr = gdk_cairo_create (drawable); + style = gtk_widget_get_style (GTK_WIDGET (day_view)); comp = e_cal_component_new (); e_cal_component_set_icalcomponent ( |