From 48eabac3272eefbb60982430d764f68a8774f016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Thu, 19 Mar 2009 16:33:38 +0000 Subject: 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 --- popup/makefile | 3 +-- popup/popup.c | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'popup') 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); -- cgit v1.2.1