diff options
author | Milan Crha <mcrha@redhat.com> | 2013-10-17 17:22:29 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2013-10-17 17:22:29 +0800 |
commit | af81b13a8994954b8c722c23e8dc073466c962f3 (patch) | |
tree | 9c95e36d3e72edd858caddfb6f4b95dc27a61f7b /calendar/gui | |
parent | 5c7c89366feb249883924ff0b3ebb30835348fff (diff) | |
download | gsoc2013-evolution-af81b13a8994954b8c722c23e8dc073466c962f3.tar gsoc2013-evolution-af81b13a8994954b8c722c23e8dc073466c962f3.tar.gz gsoc2013-evolution-af81b13a8994954b8c722c23e8dc073466c962f3.tar.bz2 gsoc2013-evolution-af81b13a8994954b8c722c23e8dc073466c962f3.tar.lz gsoc2013-evolution-af81b13a8994954b8c722c23e8dc073466c962f3.tar.xz gsoc2013-evolution-af81b13a8994954b8c722c23e8dc073466c962f3.tar.zst gsoc2013-evolution-af81b13a8994954b8c722c23e8dc073466c962f3.zip |
Bug #640382 - Prevent a crash in e_week_view_on_text_item_event()
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-week-view.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 3751e64f25..92fca66db6 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -3290,6 +3290,7 @@ tooltip_event_cb (GnomeCanvasItem *item, if (view->editing_event_num == -1) { ECalendarViewEventData *data; + g_return_val_if_fail (pevent != NULL, FALSE); data = g_malloc (sizeof (ECalendarViewEventData)); pevent->x = ((GdkEventCrossing *) event)->x_root; @@ -3311,6 +3312,8 @@ tooltip_event_cb (GnomeCanvasItem *item, return FALSE; } case GDK_MOTION_NOTIFY: + g_return_val_if_fail (pevent != NULL, FALSE); + pevent->x = ((GdkEventMotion *) event)->x_root; pevent->y = ((GdkEventMotion *) event)->y_root; pevent->tooltip = (GtkWidget *) g_object_get_data (G_OBJECT (view), "tooltip-window"); @@ -3964,6 +3967,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item, g_object_set_data ((GObject *) item, "event-num", GINT_TO_POINTER (nevent)); pevent = tooltip_get_view_event (week_view, -1, nevent); + g_return_val_if_fail (pevent != NULL, FALSE); data = g_malloc (sizeof (ECalendarViewEventData)); @@ -3991,6 +3995,8 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item, return FALSE; case GDK_MOTION_NOTIFY: + g_return_val_if_fail (pevent != NULL, FALSE); + gdk_event_get_root_coords ( gdk_event, &event_x_root, &event_y_root); |