Krelborn / KILabel

A simple to use drop in replacement for UILabel for iOS 7 and above that highlights links such as URLs, twitter style usernames and hashtags and makes them touchable.
MIT License
470 stars 133 forks source link

Fix crash #46

Open alexanderjarvis opened 8 years ago

alexanderjarvis commented 8 years ago

This patch fixes a crash by checking nil values.

Thread : Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 6523146056 __exceptionPreprocess
1  libobjc.A.dylib                6870957952 objc_exception_throw
2  CoreFoundation                 6522025928 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]
3  CoreFoundation                 6522025568 +[NSDictionary dictionaryWithObjects:forKeys:count:]
4  KILabel                        4314112932 -[KILabel attributesFromProperties] (KILabel.m:356)
5  KILabel                        4314110664 -[KILabel setText:] (KILabel.m:224)
Lyonich commented 7 years ago

Thank you! But why the developers did not write it at once?