aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-config.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-09-10 18:57:03 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-09-10 18:57:03 +0800
commit508aee66f947c5b9689262f9d523aeafa8d51ba2 (patch)
treed4533f5ef6094a18cf10003eba26b1b66b66f302 /e-util/e-config.c
parent07bec7e9f84a24801a92a877dd023e770e8e3058 (diff)
downloadgsoc2013-evolution-508aee66f947c5b9689262f9d523aeafa8d51ba2.tar.gz
gsoc2013-evolution-508aee66f947c5b9689262f9d523aeafa8d51ba2.tar.zst
gsoc2013-evolution-508aee66f947c5b9689262f9d523aeafa8d51ba2.zip
** Fix for bug #471791
svn path=/trunk/; revision=34214
Diffstat (limited to 'e-util/e-config.c')
-rw-r--r--e-util/e-config.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/e-util/e-config.c b/e-util/e-config.c
index e8d9a6e789..49e745b89b 100644
--- a/e-util/e-config.c
+++ b/e-util/e-config.c
@@ -218,7 +218,7 @@ e_config_get_type(void)
**/
EConfig *e_config_construct(EConfig *ep, int type, const char *id)
{
- g_assert(type == E_CONFIG_BOOK || type == E_CONFIG_DRUID);
+ g_return_val_if_fail (type == E_CONFIG_BOOK || type == E_CONFIG_DRUID, NULL);
ep->type = type;
ep->id = g_strdup(id);
@@ -568,7 +568,7 @@ ec_rebuild(EConfig *emp)
page = item->factory(emp, item, root, wn->frame, wn->context->data);
if (emp->type == E_CONFIG_DRUID) {
if (page) {
- g_assert(GNOME_IS_DRUID_PAGE_STANDARD(page));
+ g_return_if_fail (GNOME_IS_DRUID_PAGE_STANDARD(page));
connect = wn->frame != page;
wn->frame = page;
page = ((GnomeDruidPageStandard *)page)->vbox;
@@ -824,7 +824,7 @@ e_config_create_widget(EConfig *emp)
/*char *domain = NULL;*/
int i;
- g_assert(emp->target != NULL);
+ g_return_val_if_fail (emp->target != NULL, NULL);
ec_add_static_items(emp);
@@ -1195,7 +1195,10 @@ void *e_config_target_new(EConfig *ep, int type, size_t size)
{
EConfigTarget *t;
- g_assert(size >= sizeof(EConfigTarget));
+ if (size < sizeof(EConfigTarget)) {
+ g_warning ("Size is less than size of EConfigTarget\n");
+ size = sizeof (EConfigTarget);
+ }
t = g_malloc0(size);
t->config = ep;