diff options
author | Remco Burema <r.burema@ultimaker.com> | 2021-01-29 09:59:54 +0300 |
---|---|---|
committer | Remco Burema <r.burema@ultimaker.com> | 2021-01-29 09:59:54 +0300 |
commit | f2088d7fc8167b6d301694f95f372573bac2cb64 (patch) | |
tree | bc752edea6c7178b2f51ef417dddfd1adb967e6b /plugins/CuraEngineBackend | |
parent | a9bf3ed934d0888bf08e2aa3b0f4749373e5bc9a (diff) |
Don't take snapshot if no main window present.
You'll need the Uranium branch of the same (fix_is_visible) name if you don't want this to crash on slicing!
Diffstat (limited to 'plugins/CuraEngineBackend')
-rwxr-xr-x | plugins/CuraEngineBackend/CuraEngineBackend.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index eed9d56741..1aa6c86dcb 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -250,6 +250,9 @@ class CuraEngineBackend(QObject, Backend): @call_on_qt_thread # must be called from the main thread because of OpenGL def _createSnapshot(self) -> None: self._snapshot = None + if not CuraApplication.getInstance().isVisible: + Logger.log("w", "Can't create snapshot when renderer not initialized.") + return Logger.log("i", "Creating thumbnail image (just before slice)...") try: self._snapshot = Snapshot.snapshot(width = 300, height = 300) |