- Code: Select all
[TBXML textForElement:[TBXML childElementNamed:@"raceStartState" parentElement:raceNode]];
and the child element I'm looking for isn't there, I get a bad access error when nil is passed to textForElement. I'd like to avoid a ton of conditional statements, so I would suggest adding a line to functions such as textForElement that return an empty string if the element passed in is nil.
