[gnome-calendar/mcatanzaro/#422: 11/11] Fix crash in update_default_calendar_row()



commit 34c062a7faac04b76b4c9a816cc2cac68f367193
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Wed Jul 3 12:19:44 2019 -0500

    Fix crash in update_default_calendar_row()
    
    It's wrong to call set_row() with NULL row.
    
    Fixes #422

 src/gui/gcal-quick-add-popover.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/gcal-quick-add-popover.c b/src/gui/gcal-quick-add-popover.c
index a1d7a4cf..e7317b63 100644
--- a/src/gui/gcal-quick-add-popover.c
+++ b/src/gui/gcal-quick-add-popover.c
@@ -495,7 +495,8 @@ update_default_calendar_row (GcalQuickAddPopover *self)
   default_calendar = gcal_manager_get_default_calendar (manager);
 
   row = get_row_for_calendar (self, default_calendar);
-  select_row (self, GTK_LIST_BOX_ROW (row));
+  if (row != NULL)
+    select_row (self, GTK_LIST_BOX_ROW (row));
 }
 
 


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