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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user