[PD-dev] GUI object crash on close when in subpatcher
IOhannes m zmölnig
zmoelnig at iem.at
Sat Apr 11 21:53:14 CEST 2015
On 04/10/2015 12:08 AM, Rama Gottfried wrote:
> I tried placing a check for glist->gl_isgraph before canvas_deletelinesfor() and list_eraseiofor(), but so far haven’t been able to avoid the crash.
well, since Pd doesn't have much documentation for writing externals,
the best way is usually to look at existing (and working) externals and
how they solved the issues at hand.
now i did a quick check (e.g. g_text.c and all iemguis which use
g_all_guis.c), and all of them simply call:
with 'glist' and 'z' being passed to the delete function by Pd - no
fancy glist_getcanvas() to convert the glist to it's displaying) canvas.
and indeed, changing your line:
seems to fix all your problems.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the Pd-dev