From: hermet Date: Sun, 21 Aug 2011 12:47:11 +0000 (+0000) Subject: evas/evas_font - added exeption handlings. X-Git-Tag: 2.0_alpha~240^2~109 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4bd59cd6225b1b1cd37fa18664cf0d2814c8c479;p=framework%2Fuifw%2Fevas.git evas/evas_font - added exeption handlings. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@62659 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/engines/common/evas_font_default_walk.x b/src/lib/engines/common/evas_font_default_walk.x index 56807b8..043e50b 100644 --- a/src/lib/engines/common/evas_font_default_walk.x +++ b/src/lib/engines/common/evas_font_default_walk.x @@ -53,21 +53,25 @@ /*FIXME: doc */ #ifdef OT_SUPPORT # define EVAS_FONT_WALK_X_OFF \ - (EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET(*_ot_itr))) + ((_ot_itr) ? \ + (EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET(*_ot_itr)) : \ + 0) # define EVAS_FONT_WALK_Y_OFF \ - (EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_Y_OFF_GET(*_ot_itr))) + ((_ot_itr) ? \ + (EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_Y_OFF_GET(*_ot_itr)) : \ + 0) # define EVAS_FONT_WALK_POS \ - (EVAS_FONT_OT_POS_GET(*_ot_itr) - text_props->text_offset) + ((_ot_itr) ? \ + (EVAS_FONT_OT_POS_GET(*_ot_itr) - text_props->text_offset) : \ + 0) # define EVAS_FONT_WALK_POS_NEXT \ ((!EVAS_FONT_WALK_IS_LAST) ? \ - EVAS_FONT_OT_POS_GET(*(_ot_itr + 1)) - \ - text_props->text_offset : \ + ((_ot_itr) ? EVAS_FONT_OT_POS_GET(*(_ot_itr + 1)) : 0) - text_props->text_offset : \ EVAS_FONT_WALK_POS \ ) # define EVAS_FONT_WALK_POS_PREV \ ((char_index > 0) ? \ - EVAS_FONT_OT_POS_GET(*(_ot_itr - 1)) - \ - text_props->text_offset : \ + ((_ot_itr) ? EVAS_FONT_OT_POS_GET(*(_ot_itr - 1)) : 0) - text_props->text_offset : \ EVAS_FONT_WALK_POS \ ) #else