Skip to content

Commit

Permalink
Merge pull request #6 from hon-key/master
Browse files Browse the repository at this point in the history
fix a crash
  • Loading branch information
tracy-e authored Sep 16, 2018
2 parents 4ada56f + c6947bd commit 4a0abe2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion OCGumbo/OCGumbo.m
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ - (OCGumboAttribute *)getAttributeNode:(NSString *)name {
}

- (NSString *)getAttribute:(NSString *)name {
return @(oc_gumbo_get_attribute(_gumboNode, [name UTF8String]));
const char *text = oc_gumbo_get_attribute(_gumboNode, [name UTF8String]);
return text ? @(text) : nil;
}

@end
Expand Down

0 comments on commit 4a0abe2

Please sign in to comment.