diff options
author | Miller Puckette <millerpuckette@users.sourceforge.net> | 2008-12-30 01:51:31 +0000 |
---|---|---|
committer | Miller Puckette <millerpuckette@users.sourceforge.net> | 2008-12-30 01:51:31 +0000 |
commit | 0648504ff46cde69a7392a647d718f621c402b08 (patch) | |
tree | 142fa7cc238f6c22922ab8f91230ecdc344a34b3 /pd/src/g_rtext.c | |
parent | b56403eec4b767e04880c418a467b88f7cfeb2ca (diff) |
0.42-0test08
svn path=/trunk/; revision=10469
Diffstat (limited to 'pd/src/g_rtext.c')
-rw-r--r-- | pd/src/g_rtext.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pd/src/g_rtext.c b/pd/src/g_rtext.c index 948ebcb4..63a7485b 100644 --- a/pd/src/g_rtext.c +++ b/pd/src/g_rtext.c @@ -342,8 +342,11 @@ void rtext_retext(t_rtext *x) /* find the rtext that goes with a text item */ t_rtext *glist_findrtext(t_glist *gl, t_text *who) { - t_rtext *x = gl->gl_editor->e_rtext; - while (x && x->x_text != who) x = x->x_next; + t_rtext *x; + if (!gl->gl_editor) + canvas_create_editor(gl); + for (x = gl->gl_editor->e_rtext; x && x->x_text != who; x = x->x_next) + ; if (!x) bug("glist_findrtext"); return (x); } |