Skip to content
This repository has been archived by the owner on Jun 2, 2018. It is now read-only.

addObserverForKeyPaths with only one entry in array causes crash on value change #132

Closed
Tharit opened this issue Mar 27, 2013 · 2 comments

Comments

@Tharit
Copy link

Tharit commented Mar 27, 2013

When registering an observer using addObserverForKeyPaths with only one property name in the array, BlocksKit will crash the application as soon as that property changes.

The reason appears to be that the provided BKSenderKeyPathBlock is called as BKSenderBlock (so without the second parameter). The helper method used to register all observers sets the context wich is used to infer the block type based solely on the number of entries in the array (NSObject+BlockObservation.m:112), which is clearly wrong in this case.

@mralexgray
Copy link
Contributor

I second this motion… and it is causing all sorts of problems… I had to remove blockskit from my project… until i realized all my dependencies on it.. please FIX!

@zwaldowski
Copy link
Collaborator

Sorry about that. Fixed on master. Thanks for the support.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants