week-grid, week-header: properly initialize datetimes

Since we use autoptr on those, we may end up falling in to
the early return and mistakenly unreferencing the not
initialized new date.
This commit is contained in:
Georges Basile Stavracas Neto
2017-04-29 12:57:06 -03:00
parent b1b20737c8
commit 7dc5eb5bf5
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -989,7 +989,9 @@ gcal_week_grid_drag_drop (GtkWidget *widget,
drop_cell = get_dnd_cell (widget, x, y);
event_widget = gtk_drag_get_source_widget (context);
week_start = dnd_date = NULL;
week_start = NULL;
dnd_date = NULL;
new_end = NULL;
if (!GCAL_IS_EVENT_WIDGET (event_widget))
return FALSE;
+3 -1
View File
@@ -1369,7 +1369,9 @@ gcal_week_header_drag_drop (GtkWidget *widget,
drop_cell = get_dnd_cell (widget, x, y);
event_widget = gtk_drag_get_source_widget (context);
week_start = dnd_date = NULL;
week_start = NULL;
dnd_date = NULL;
new_end = NULL;
if (!GCAL_IS_EVENT_WIDGET (event_widget))
return FALSE;