diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2009-03-19 16:33:38 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2009-03-19 16:33:38 +0000 |
commit | 48eabac3272eefbb60982430d764f68a8774f016 (patch) | |
tree | 158251879671293237db248b67e7759507b11bb8 | |
parent | 6cf3b5ec3cc8b854fe24ecd8eeff2e094106913d (diff) |
fixed crasher bug with 0.42:
the problem is that popup_vis() is called with a glist that has no gl_editor IF the [popup] is in a gop.
the fix is to check whether there is an editor, and if there is none, call "canvas_create_editor(glist)"
svn path=/trunk/externals/bbogart/; revision=10874
-rw-r--r-- | popup/makefile | 3 | ||||
-rw-r--r-- | popup/popup.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/popup/makefile b/popup/makefile index b70f5c3..42f69b6 100644 --- a/popup/makefile +++ b/popup/makefile @@ -59,8 +59,7 @@ LINUXINCLUDE = -I../../src -I../../../pd/src .c.pd_linux: cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c - ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm - strip --strip-unneeded $*.pd_linux + ld -shared -o $*.pd_linux $*.o -lc -lm rm $*.o # ----------------------- Mac OSX ----------------------- diff --git a/popup/popup.c b/popup/popup.c index 3529921..c2eb47b 100644 --- a/popup/popup.c +++ b/popup/popup.c @@ -325,6 +325,10 @@ static void popup_vis(t_gobj *z, t_glist *glist, int vis) DEBUG(post("vis: %d",vis);) if (vis) { #ifdef PD_MINOR_VERSION + /* JMZ: create an editor if there is none; + * on 0.42 there might be none IF [popup] is contained within a gop + */ + if (!glist->gl_editor) canvas_create_editor(glist); y = (t_rtext *) rtext_new(glist, (t_text *)z); #else y = (t_rtext *) rtext_new(glist, (t_text *)z,0,0); |