From: cedric Date: Thu, 16 Sep 2010 15:49:56 +0000 (+0000) Subject: * edje: prevent segv due to dead relative part. X-Git-Tag: submit/trunk/20120815.180907~892 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=271fd4613fddefecf1885203f44bba96e256b797;p=profile%2Fivi%2Fedje.git * edje: prevent segv due to dead relative part. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@52347 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/edje_load.c b/src/lib/edje_load.c index afd3f8e..2529c03 100644 --- a/src/lib/edje_load.c +++ b/src/lib/edje_load.c @@ -514,14 +514,18 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g for (i = 0; i < ed->table_parts_size; i++) { rp = ed->table_parts[i]; - if (rp->param1.description->rel1.id_x >= 0) - rp->param1.rel1_to_x = ed->table_parts[rp->param1.description->rel1.id_x % ed->table_parts_size]; - if (rp->param1.description->rel1.id_y >= 0) - rp->param1.rel1_to_y = ed->table_parts[rp->param1.description->rel1.id_y % ed->table_parts_size]; - if (rp->param1.description->rel2.id_x >= 0) - rp->param1.rel2_to_x = ed->table_parts[rp->param1.description->rel2.id_x % ed->table_parts_size]; - if (rp->param1.description->rel2.id_y >= 0) - rp->param1.rel2_to_y = ed->table_parts[rp->param1.description->rel2.id_y % ed->table_parts_size]; + if (rp->param1.description) /* FIXME: prevent rel to gone radient part to go wrong. You may + be able to remove this when all theme are correctly rewritten. */ + { + if (rp->param1.description->rel1.id_x >= 0) + rp->param1.rel1_to_x = ed->table_parts[rp->param1.description->rel1.id_x % ed->table_parts_size]; + if (rp->param1.description->rel1.id_y >= 0) + rp->param1.rel1_to_y = ed->table_parts[rp->param1.description->rel1.id_y % ed->table_parts_size]; + if (rp->param1.description->rel2.id_x >= 0) + rp->param1.rel2_to_x = ed->table_parts[rp->param1.description->rel2.id_x % ed->table_parts_size]; + if (rp->param1.description->rel2.id_y >= 0) + rp->param1.rel2_to_y = ed->table_parts[rp->param1.description->rel2.id_y % ed->table_parts_size]; + } if (rp->part->clip_to_id >= 0) { rp->clip_to = ed->table_parts[rp->part->clip_to_id % ed->table_parts_size];