Added exception handling to layerview

Fixes Ultimaker/Cura#362
This commit is contained in:
Jaime van Kessel 2015-09-10 11:16:55 +02:00
parent 9c873c7d34
commit a0a0f3ea01

View file

@ -92,10 +92,12 @@ class LayerView(View):
layer = self._current_layer_num - i layer = self._current_layer_num - i
if layer < 0: if layer < 0:
continue continue
try:
layer_mesh = layer_data.getLayer(layer).createMesh() layer_mesh = layer_data.getLayer(layer).createMesh()
if not layer_mesh or layer_mesh.getVertices() is None: if not layer_mesh or layer_mesh.getVertices() is None:
continue continue
except:
continue
self._current_layer_mesh.addVertices(layer_mesh.getVertices()) self._current_layer_mesh.addVertices(layer_mesh.getVertices())