Crash/Leak when deleting datatip
Reported by Caio SOUZA
BUG DESCRIPTION:
----------------
1)Deleting a datatip from a loaded *.scg file and closing the figure leads to crash;
2)Using the "datatipRemove" macro with invalid index leads to crash
3)Datatip graphic object were not deleted when its parent polyline was deleted.
ERROR LOG:
----------
HOW TO REPRODUCE THE BUG:
-------------------------
1)//Test case
param3d();
e=gce();
datatipCreate(e, 2);
fname = TMPDIR + '/datatip_crash_test.scg'
xsave(fname);
close(gcf());
load(fname);
deletefile(fname);
e=gce();
p=e.children;
datatipRemove(p, 1);
close(gcf());
2)//Test case
param3d();
e=gce();
datatipCreate(e, 2);
datatipRemove(e, 10)
3)//Test case
param3d();
e=gce();
d=datatipCreate(e, 2);
delete(e);
assert_checkequal(is_handle_valid(d), %F)
OTHER INFORMATION:
------------------