mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-05 01:10:43 +08:00
check for already allocated memory
This commit is contained in:
parent
d4d1975a8f
commit
a3a7f97e28
@ -189,8 +189,20 @@ void stl_transform(stl_file const *stl_src, stl_file *stl_dst, float const *traf
|
|||||||
int i_face, i_vertex, i, j;
|
int i_face, i_vertex, i, j;
|
||||||
if (stl_src->error || stl_dst->error)
|
if (stl_src->error || stl_dst->error)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (stl_dst->stats.facets_malloced != stl_src->stats.number_of_facets)
|
||||||
|
{
|
||||||
stl_dst->stats.number_of_facets = stl_src->stats.number_of_facets;
|
stl_dst->stats.number_of_facets = stl_src->stats.number_of_facets;
|
||||||
|
if (stl_dst->stats.facets_malloced > 0)
|
||||||
|
{
|
||||||
|
stl_reallocate(stl_dst);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
stl_allocate(stl_dst);
|
stl_allocate(stl_dst);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
printf("Supplied trafo: %.1f, %.1f, %.1f, %.1f, %.1f, %.1f, %.1f, %.1f, %.1f, %.1f, %.1f, %.1f\n",
|
printf("Supplied trafo: %.1f, %.1f, %.1f, %.1f, %.1f, %.1f, %.1f, %.1f, %.1f, %.1f, %.1f, %.1f\n",
|
||||||
trafo3x4[0],
|
trafo3x4[0],
|
||||||
trafo3x4[1],
|
trafo3x4[1],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user