From e46339089ec83c28a735d7b74ddee6ae8e6a1ae4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 10 Nov 2019 13:39:33 +0100 Subject: Fix cast warning --- ganv/wrap.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; \ + } \ } \ } -- cgit v1.2.1