views: protect against invalid drop

If the user tries to drop a e.g. file, GNOME Calendar crashes
immediately.

While the desired behavior would be checking if that's an ics file,
lets just not crash for now.

https://bugzilla.gnome.org/show_bug.cgi?id=771680
This commit is contained in:
Georges Basile Stavracas Neto
2016-09-27 22:41:17 -03:00
parent 10391ae6a9
commit 81873994da
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -1342,6 +1342,9 @@ navigator_drag_drop_cb (GcalYearView *self,
if (calculate_day_month_for_coord (self, x, y, &day, &month, &is_title))
{
if (!GCAL_IS_EVENT_WIDGET (gtk_drag_get_source_widget (context)))
return FALSE;
if (!is_title)
{
GcalEventWidget *event_widget;