summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-11-10 13:39:33 +0100
committerDavid Robillard <d@drobilla.net>2019-11-10 13:39:33 +0100
commite46339089ec83c28a735d7b74ddee6ae8e6a1ae4 (patch)
treecc2f43194c61c3ef133ba3cdd6e6d125eb50c7c5
parent0141b42277c75a5c0725ffc4338aa6d31af74e5b (diff)
downloadganv-e46339089ec83c28a735d7b74ddee6ae8e6a1ae4.tar.gz
ganv-e46339089ec83c28a735d7b74ddee6ae8e6a1ae4.tar.bz2
ganv-e46339089ec83c28a735d7b74ddee6ae8e6a1ae4.zip
Fix cast warning
-rw-r--r--ganv/wrap.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/ganv/wrap.hpp b/ganv/wrap.hpp
index 26e04d1..4affe83 100644
--- a/ganv/wrap.hpp
+++ b/ganv/wrap.hpp
@@ -124,7 +124,11 @@ private: \
static inline const Ganv::Name* \
wrap(const Ganv##Name* gobj) \
{ \
- return wrap((Ganv##Name*)gobj); \
+ if (gobj) { \
+ return (const Ganv::Name*)ganv_item_get_wrapper(GANV_ITEM(gobj)); \
+ } else { \
+ return NULL; \
+ } \
} \
}