diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2011-02-09 17:07:09 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2011-02-09 17:07:09 +0000 |
commit | 68c78791ee4d8040d1bb82dd0f5a60f9a02703ab (patch) | |
tree | 6e14d1e2b138fc92d3568fe34caf6a5437f36b0d /iemlib2/src | |
parent | 1cd2ed068468318929e6854fa04a0aa0806895b7 (diff) |
protect against missing g_canvas.h
svn path=/trunk/externals/iemlib/; revision=14887
Diffstat (limited to 'iemlib2/src')
-rw-r--r-- | iemlib2/src/parentdollarzero.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/iemlib2/src/parentdollarzero.c b/iemlib2/src/parentdollarzero.c index 85b79e9..3f209b1 100644 --- a/iemlib2/src/parentdollarzero.c +++ b/iemlib2/src/parentdollarzero.c @@ -5,7 +5,9 @@ iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 #include "m_pd.h" -#include "g_canvas.h" +#ifdef HAVE_G_CANVAS_H +# include "g_canvas.h" +#endif #include "iemlib.h" @@ -30,6 +32,7 @@ static void parentdollarzero_bang(t_parentdollarzero *x) static void *parentdollarzero_new(void) { t_parentdollarzero *x = (t_parentdollarzero *)pd_new(parentdollarzero_class); +#ifdef HAVE_G_CANVAS_H t_glist *glist = (t_glist *)canvas_getcurrent(); t_canvas *this_canvas = glist_getcanvas(glist); @@ -38,6 +41,10 @@ static void *parentdollarzero_new(void) if(x->x_is_there_a_parent) x->s_parent_unique = canvas_realizedollar((t_canvas *)this_canvas->gl_owner, gensym("$0")); else +#else + x->x_is_there_a_parent=0; + error("[parentdollarzero]: compiled without g_canvas.h - cannot work properly!"); +#endif x->s_parent_unique = gensym(""); outlet_new(&x->x_obj, &s_symbol); return (x); |