[gnome-calendar] year-view: prevent segfault when there's no child
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] year-view: prevent segfault when there's no child
- Date: Tue, 20 Jan 2015 18:52:13 +0000 (UTC)
commit d76ba04d921748f8298d0a51af654bd955fdaaf7
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Tue Jan 20 13:46:22 2015 -0500
year-view: prevent segfault when there's no child
src/gcal-year-view.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-year-view.c b/src/gcal-year-view.c
index 4dc9a7b..8c034b3 100644
--- a/src/gcal-year-view.c
+++ b/src/gcal-year-view.c
@@ -1116,7 +1116,7 @@ gcal_year_view_component_removed (ECalDataModelSubscriber *subscriber,
for (l = children; l != NULL; l = g_list_next (l))
{
GcalEventWidget *child_widget = GCAL_EVENT_WIDGET (gtk_bin_get_child (GTK_BIN (l->data)));
- if (g_strcmp0 (uuid, gcal_event_widget_peek_uuid (child_widget)) == 0)
+ if (child_widget != NULL && g_strcmp0 (uuid, gcal_event_widget_peek_uuid (child_widget)) == 0)
gtk_widget_destroy (GTK_WIDGET (child_widget));
}
g_list_free (children);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]