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,9 +92,11 @@ class LayerView(View):
layer = self._current_layer_num - i
if layer < 0:
continue
layer_mesh = layer_data.getLayer(layer).createMesh()
if not layer_mesh or layer_mesh.getVertices() is None:
try:
layer_mesh = layer_data.getLayer(layer).createMesh()
if not layer_mesh or layer_mesh.getVertices() is None:
continue
except:
continue
self._current_layer_mesh.addVertices(layer_mesh.getVertices())