Skip to content

Instantly share code, notes, and snippets.

@vinnybad
Last active September 12, 2016 03:08
Show Gist options
  • Save vinnybad/fcc6c56f44d2ef865b0b513e644bdd1f to your computer and use it in GitHub Desktop.
Save vinnybad/fcc6c56f44d2ef865b0b513e644bdd1f to your computer and use it in GitHub Desktop.
/*
* Block Safety
*
* We sometimes accidentally invoke a nil block...this protects against it.
*
*/
#define SAFE_CALL(b, ...) \
if(b) b(__VA_ARGS__);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment