aboutsummaryrefslogtreecommitdiff
path: root/popup/popup.c
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2009-03-19 16:33:38 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2009-03-19 16:33:38 +0000
commit48eabac3272eefbb60982430d764f68a8774f016 (patch)
tree158251879671293237db248b67e7759507b11bb8 /popup/popup.c
parent6cf3b5ec3cc8b854fe24ecd8eeff2e094106913d (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
Diffstat (limited to 'popup/popup.c')
-rw-r--r--popup/popup.c4
1 files changed, 4 insertions, 0 deletions
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);