mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
Workaround to fix crash reported in #2209
This commit is contained in:
parent
4418a9b926
commit
61a0ab4280
2 changed files with 10 additions and 2 deletions
|
@ -108,6 +108,9 @@ stl_fix_normal_directions(stl_file *stl) {
|
|||
|
||||
if (stl->error) return;
|
||||
|
||||
// this may happen for malformed models, see: https://github.com/prusa3d/Slic3r/issues/2209
|
||||
if (stl->stats.number_of_facets == 0) return;
|
||||
|
||||
/* Initialize linked list. */
|
||||
head = (struct stl_normal*)malloc(sizeof(struct stl_normal));
|
||||
if(head == NULL) perror("stl_fix_normal_directions");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue