diff options
Diffstat (limited to 'OpenAL32/Include/alMain.h')
-rw-r--r-- | OpenAL32/Include/alMain.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 16df2330..c0c7baac 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -74,13 +74,16 @@ static const union { #define EXTRACT_VCALL_ARGS(...) __VA_ARGS__ /* Call a "virtual" method on an object, with arguments. */ -#define VCALL(obj, func, args) (((obj)->vtbl->func)((obj), EXTRACT_VCALL_ARGS args)) +#define VCALL(obj, func, args) ((obj)->vtbl->func((obj), EXTRACT_VCALL_ARGS args)) /* Call a "virtual" method on an object, with no arguments. */ -#define VCALL_NOARGS(obj, func) (((obj)->vtbl->func)((obj))) +#define VCALL_NOARGS(obj, func) ((obj)->vtbl->func((obj))) #define DELETE_OBJ(obj) do { \ - VCALL_NOARGS((obj),Destruct); \ - VCALL_NOARGS((obj),Delete); \ + if((obj) != NULL) \ + { \ + VCALL_NOARGS((obj),Destruct); \ + VCALL_NOARGS((obj),Delete); \ + } \ } while(0) |