#define VORTEX_CHECK_REF2 (   ref,
  return_value,
  ref2,
  free2_func 
)
Value:
do { \
if (ref == NULL) { \
free2_func (ref); \
return return_value; \
} \
} while (0)

Allows to check the reference provided, returning the return value provided, also releasing a second reference with a custom free function.

Parameters
refThe reference to be checke for NULL.
return_valueThe return value to return in case of NULL reference.
ref2Second reference to be released
free2_funcFunction to be used to release the second reference.

Referenced by vortex_async_queue_new(), vortex_ctx_new(), and vortex_frame_create_full().