check struct.member for being empty first
if(struct.member!=NULL) //make sure not un-initialised
{ // do other checks here
if(str_cmp(struct.member,"same_text")==0)
{
// they are the same - so do something
}
}
and first usage of struct member MUST be a
struct.member = str_create("something"); //is now now initialised
I also assume you are using
str_cpy() and
str_cmp() and not
strcpy() and
strcmp()because they ARE different...