Skip to content

Commit

Permalink
attempted fix to gop-save-crash bug (addressed in patch 2913280 but
Browse files Browse the repository at this point in the history
fixed differently)
  • Loading branch information
msp committed Aug 18, 2010
1 parent 4e4d222 commit ae4e9dc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 0 additions & 2 deletions src/d_delay.c
Expand Up @@ -108,8 +108,6 @@ static t_int *sigdelwrite_perform(t_int *w)
phase -= nsamps;
}
}
bp = vp + c->c_phase;

c->c_phase = phase;
return (w+4);
}
Expand Down
13 changes: 6 additions & 7 deletions src/g_editor.c
Expand Up @@ -716,7 +716,7 @@ static void glist_doreload(t_glist *gl, t_symbol *name, t_symbol *dir,
{
t_gobj *g;
int i, nobj = glist_getindex(gl, 0); /* number of objects */
int hadwindow = gl->gl_havewindow;
int hadwindow = (gl->gl_editor != 0);
for (g = gl->gl_list, i = 0; g && i < nobj; i++)
{
if (g != except && pd_class(&g->g_pd) == canvas_class &&
Expand All @@ -729,8 +729,10 @@ static void glist_doreload(t_glist *gl, t_symbol *name, t_symbol *dir,
replacement will be at the end of the list, so we don't
do g = g->g_next in this case. */
int j = glist_getindex(gl, g);
if (!gl->gl_havewindow)
canvas_vis(glist_getcanvas(gl), 1);
if (!gl->gl_editor)
canvas_vis(gl, 1);
if (!gl->gl_editor)
bug("editor");
glist_noselect(gl);
glist_select(gl, g);
canvas_setundo(gl, canvas_undo_cut,
Expand All @@ -747,7 +749,7 @@ static void glist_doreload(t_glist *gl, t_symbol *name, t_symbol *dir,
g = g->g_next;
}
}
if (!hadwindow && gl->gl_havewindow)
if (!hadwindow && gl->gl_editor)
canvas_vis(glist_getcanvas(gl), 0);
}

Expand Down Expand Up @@ -924,9 +926,6 @@ void canvas_vis(t_canvas *x, t_floatarg f)
{
char buf[30];
int flag = (f != 0);
/* why is this here, what's the problem? This gets triggered by GOPs */
if (x != glist_getcanvas(x))
bug("canvas_vis");
if (flag)
{
/* If a subpatch/abstraction has GOP/gl_isgraph set, then it will have
Expand Down
3 changes: 1 addition & 2 deletions src/g_graph.c
Expand Up @@ -176,8 +176,7 @@ void glist_grab(t_glist *x, t_gobj *y, t_glistmotionfn motionfn,

t_canvas *glist_getcanvas(t_glist *x)
{
while (x->gl_owner && !x->gl_havewindow && x->gl_isgraph &&
gobj_shouldvis(&x->gl_gobj, x->gl_owner))
while (x->gl_owner && !x->gl_havewindow && x->gl_isgraph)
x = x->gl_owner;
return((t_canvas *)x);
}
Expand Down
1 change: 1 addition & 0 deletions src/notes.txt
Expand Up @@ -2,6 +2,7 @@ font courier not found?
carriage returns after posting
lose makesfx.bat, etc. from msw (and move out personal stuff?)
control C control
window titles wrong on Macintosh

---------------- dolist --------------------

Expand Down

0 comments on commit ae4e9dc

Please sign in to comment.