prevent macro null derefs

SVN revision: 56102
This commit is contained in:
Mike Blumenkrantz 2011-01-14 06:46:04 +00:00
parent fe45654e16
commit b2e46be157
1 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ typedef struct _Evas_Object_Textblock_Format Evas_Object_Textblock_Format;
* the current char pointed to and decrements ind but ensures it stays in
* the text range.
*/
#define GET_PREV(text, ind) (((ind) > 0) ? (text[(ind)--]) : (text[ind]))
#define GET_PREV(text, ind) (text ? (((ind) > 0) ? (text[(ind)--]) : (text[ind])) : 0)
/**
* @internal
* @def GET_NEXT(text, ind)
@ -216,7 +216,7 @@ typedef struct _Evas_Object_Textblock_Format Evas_Object_Textblock_Format;
* the current char pointed to and increments indd but ensures it stays in
* the text range.
*/
#define GET_NEXT(text, ind) ((text[ind]) ? (text[(ind)++]) : (text[ind]))
#define GET_NEXT(text, ind) (text ? ((text[ind]) ? (text[(ind)++]) : (text[ind])) : 0)
/*FIXME: document the structs and struct items. */
struct _Evas_Object_Style_Tag