Throw a fatal exception if no layers are detected

This commit is contained in:
Alessandro Ranellucci 2011-11-16 10:26:47 +01:00
parent 55f00fdb35
commit 9ab81880c9

View File

@ -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};