Fixing “Potential null dereference. According to coding standards in ‘Creating and Returning NSError Objects’ the parameter ‘error’ may be null” in SFHFKeychainUtils running the Static Analyzer
Real quick post- if you run static analyzer, Clang, etc and it’s giving you this issue, it’s an easy fix. The error references the documentation that you can look at: “Creating and Returning NSError Objects” -see section 3-5.
This is what the error will look like:
![]()
This is how you fix it:

Pretty simple just put an if statement around it to make sure error isn’t null already!
Just saw this:
http://github.com/yllan/scifihifi-iphone/commit/9816a98f674b2933588e0447a9148ecd626882eb (unfortunately it’s not incorporated yet into the Master)
Categories: iPhone Dev

