Throw a fatal exception if no layers are detected
This commit is contained in:
parent
55f00fdb35
commit
9ab81880c9
1 changed files with 2 additions and 0 deletions
|
@ -87,6 +87,8 @@ sub parse_file {
|
|||
}
|
||||
}
|
||||
|
||||
die "Invalid input file\n" if !@{$print->layers};
|
||||
|
||||
# remove last layer if empty
|
||||
# (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};
|
||||
|
|
Loading…
Reference in a new issue