Commit d1763548 authored by Guillem Bartrina's avatar Guillem Bartrina
Browse files

fix abinfo error message on patch loading

parent c2eeda56
......@@ -2508,7 +2508,7 @@ static t_symbol *ab_extend_name(t_canvas *x, t_symbol *s)
return gensym(res);
}
static int abframe = 0;
int abframe = 0;
static void canvas_abframe(t_canvas *x, t_float val)
{
abframe = val;
......
......@@ -580,6 +580,7 @@ EXTERN void canvas_unsetcurrent(t_canvas *x);
EXTERN t_symbol *canvas_realizedollar(t_canvas *x, t_symbol *s);
EXTERN t_canvas *canvas_getrootfor(t_canvas *x);
EXTERN t_canvas *canvas_getrootfor_ab(t_canvas *x);
EXTERN int abframe;
EXTERN void canvas_dirty(t_canvas *x, t_floatarg n);
EXTERN int canvas_getfont(t_canvas *x);
typedef int (*t_canvasapply)(t_canvas *x, t_int x1, t_int x2, t_int x3);
......
......@@ -1651,10 +1651,15 @@ void *abinfo_new(void)
outlet_new(&x->x_obj, &s_list);
}
else
{
if(!abframe)
{
error("abinfo: only instantiable inside an ab object");
x = 0;
}
else
x = pd_new(text_class);
}
return (x);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment