Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemco Burema <r.burema@ultimaker.com>2021-07-30 20:50:18 +0300
committerRemco Burema <r.burema@ultimaker.com>2021-07-30 20:50:18 +0300
commita2442919f4f7216bbe386c1da3c45ab94069be72 (patch)
treea05d314c78af061c9d2a0e024a4d818320ee9977 /cura/Snapshot.py
parentf5eb2ec74fb79f81c31d8456a207d71af4b238f0 (diff)
Part of fix for crash on context menu open + click on slice.
See also the backend (Uranium) fix/PR (needed for this to work properly). If the context menu is opened over the slice button, then it _may_ on some cases (on Windows) fail on the creation of the snapshot. Within this fix, the snapshot is then still not created, but at least it doesn't crash any more. (Also the snapshot _will_ be there if a reslice is done.) part of CURA-8412
Diffstat (limited to 'cura/Snapshot.py')
-rw-r--r--cura/Snapshot.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cura/Snapshot.py b/cura/Snapshot.py
index ca9c442fb5..08dd4d1030 100644
--- a/cura/Snapshot.py
+++ b/cura/Snapshot.py
@@ -93,7 +93,7 @@ class Snapshot:
pixel_output = preview_pass.getOutput()
try:
min_x, max_x, min_y, max_y = Snapshot.getImageBoundaries(pixel_output)
- except ValueError:
+ except (ValueError, AttributeError):
return None
size = max((max_x - min_x) / render_width, (max_y - min_y) / render_height)