[evolution] e_calendar_item_set_selection can be called with NULL dates



commit ecb305fadfdc91535c59b4b92f0800d7612e42b3
Author: Milan Crha <mcrha redhat com>
Date:   Fri Aug 14 14:22:50 2015 +0200

    e_calendar_item_set_selection can be called with NULL dates
    
    This wasn't checked for and produced runtime warning when being done so.

 e-util/e-calendar-item.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-calendar-item.c b/e-util/e-calendar-item.c
index 10e2a5d..57a43dc 100644
--- a/e-util/e-calendar-item.c
+++ b/e-util/e-calendar-item.c
@@ -3504,7 +3504,7 @@ e_calendar_item_set_selection (ECalendarItem *calitem,
 
        if (e_calendar_item_get_selection (calitem, &current_start_date, &current_end_date)) {
                /* No change, no need to recalculate anything */
-               if (g_date_valid (start_date) && g_date_valid (end_date) &&
+               if (start_date && end_date && g_date_valid (start_date) && g_date_valid (end_date) &&
                    g_date_compare (start_date, &current_start_date) == 0 &&
                    g_date_compare (end_date, &current_end_date) == 0)
                        return;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]