App crashes on this line

According to Apple documentation
"If CFRelease argument is NULL, this will cause a runtime error and your application will crash"
Adding check before releasing object.
Merge pull request #1 from Bdar1/patch-1

App crashes on this line