https://codereview.appspot.com/342060043/diff/20001/lily/stencil-integral.cc
File lily/stencil-integral.cc (right):

https://codereview.appspot.com/342060043/diff/20001/lily/stencil-integral.cc#newcode1132
lily/stencil-integral.cc:1132: Stencil *q = unsmob<Stencil>
(s->smobbed_copy ());
Once you create a smobbed copy, it must be protected from garbage
collection.  You don't do this here at all.  What you need to do is to
retain the SCM value on the stack, not its unsmobbification.  If you
don't want to keep unsmobbing it, you can keep both and do an
scm_remember_upto_here (scm_q);
at the point up to which it must not be collected.  However, it seems
that uses here are few enough that you can just do
SCM q = s->smobbed_copy ();
and use unsmob<Stencil> (q) where you now use q.

https://codereview.appspot.com/342060043/

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to