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) ...@@ -2508,7 +2508,7 @@ static t_symbol *ab_extend_name(t_canvas *x, t_symbol *s)
return gensym(res); return gensym(res);
} }
static int abframe = 0; int abframe = 0;
static void canvas_abframe(t_canvas *x, t_float val) static void canvas_abframe(t_canvas *x, t_float val)
{ {
abframe = val; abframe = val;
......
...@@ -580,6 +580,7 @@ EXTERN void canvas_unsetcurrent(t_canvas *x); ...@@ -580,6 +580,7 @@ EXTERN void canvas_unsetcurrent(t_canvas *x);
EXTERN t_symbol *canvas_realizedollar(t_canvas *x, t_symbol *s); EXTERN t_symbol *canvas_realizedollar(t_canvas *x, t_symbol *s);
EXTERN t_canvas *canvas_getrootfor(t_canvas *x); EXTERN t_canvas *canvas_getrootfor(t_canvas *x);
EXTERN t_canvas *canvas_getrootfor_ab(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 void canvas_dirty(t_canvas *x, t_floatarg n);
EXTERN int canvas_getfont(t_canvas *x); EXTERN int canvas_getfont(t_canvas *x);
typedef int (*t_canvasapply)(t_canvas *x, t_int x1, t_int x2, t_int x3); typedef int (*t_canvasapply)(t_canvas *x, t_int x1, t_int x2, t_int x3);
......
...@@ -1652,8 +1652,13 @@ void *abinfo_new(void) ...@@ -1652,8 +1652,13 @@ void *abinfo_new(void)
} }
else else
{ {
error("abinfo: only instantiable inside an ab object"); if(!abframe)
x = 0; {
error("abinfo: only instantiable inside an ab object");
x = 0;
}
else
x = pd_new(text_class);
} }
return (x); 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