diff options
author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-09-03 02:44:00 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-09-03 02:44:00 +0800 |
commit | f8374109ac06f8c0528dcf27f214f26c5d2aaf8d (patch) | |
tree | 6f433c6f52d6f71cc54e4852c0866c8982e1ecb8 /calendar/gui/comp-editor-factory.c | |
parent | 8c122d342656c0cad8babf4cb26796256b636fb4 (diff) | |
download | gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.gz gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.bz2 gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.lz gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.xz gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.zst gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.zip |
** Fix for bug #471791 (Move away from asserts to g_ret*)
svn path=/trunk/; revision=34156
Diffstat (limited to 'calendar/gui/comp-editor-factory.c')
-rw-r--r-- | calendar/gui/comp-editor-factory.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c index 148f1093c0..95216604c8 100644 --- a/calendar/gui/comp-editor-factory.c +++ b/calendar/gui/comp-editor-factory.c @@ -145,10 +145,8 @@ comp_editor_factory_init (CompEditorFactory *factory) static void free_request (Request *r) { - if (r->type == REQUEST_EXISTING) { - g_assert (r->u.existing.uid != NULL); + if (r->type == REQUEST_EXISTING) g_free (r->u.existing.uid); - } g_free (r); } @@ -228,7 +226,7 @@ editor_destroy_cb (GtkObject *object, gpointer data) oc->editor_count--; /* See if we need to free the client */ - g_assert (oc->pending == NULL); + g_return_if_fail (oc->pending == NULL); if (oc->editor_count != 0) return; @@ -247,7 +245,7 @@ edit_existing (OpenClient *oc, const char *uid) ECalComponentVType vtype; CompEditorFlags flags = { 0, }; - g_assert (oc->open); + g_return_if_fail (oc->open); /* Get the object */ if (!e_cal_get_object (oc->client, uid, NULL, &icalcomp, NULL)) { @@ -334,7 +332,7 @@ edit_new (OpenClient *oc, const GNOME_Evolution_Calendar_CompEditorFactory_CompE comp = get_default_task (oc->client); break; default: - g_assert_not_reached (); + g_return_if_reached (); return; } @@ -531,7 +529,7 @@ queue_edit_existing (OpenClient *oc, const char *uid) { Request *request; - g_assert (!oc->open); + g_return_if_fail (!oc->open); request = g_new (Request, 1); request->type = REQUEST_EXISTING; @@ -587,7 +585,7 @@ queue_edit_new (OpenClient *oc, const GNOME_Evolution_Calendar_CompEditorFactory { Request *request; - g_assert (!oc->open); + g_return_if_fail (!oc->open); request = g_new (Request, 1); request->type = REQUEST_NEW; |