Throw a fatal exception if no layers are detected
This commit is contained in:
parent
55f00fdb35
commit
9ab81880c9
@ -87,6 +87,8 @@ sub parse_file {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
die "Invalid input file\n" if !@{$print->layers};
|
||||||
|
|
||||||
# remove last layer if empty
|
# remove last layer if empty
|
||||||
# (we might have created it because of the $max_layer = ... + 1 code below)
|
# (we might have created it because of the $max_layer = ... + 1 code below)
|
||||||
pop @{$print->layers} if !@{$print->layers->[-1]->surfaces} && !@{$print->layers->[-1]->lines};
|
pop @{$print->layers} if !@{$print->layers->[-1]->surfaces} && !@{$print->layers->[-1]->lines};
|
||||||
|
Loading…
Reference in New Issue
Block a user