Skip to content

Commit

Permalink
Merge pull request #974 from Ultimaker/CURA-12190_fix_cache_crash
Browse files Browse the repository at this point in the history
[CURA-12190] Expand the circumstances under which we expect the C++ object to be gone.
  • Loading branch information
HellAholic authored Oct 18, 2024
2 parents d6cab62 + 1cea1cd commit 1c95bb3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions UM/Settings/Models/SettingPropertyProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,16 +363,16 @@ def _onPropertiesChanged(self, key: str, property_names: List[str]) -> None:
# logic to emit pyqtSignals is gone.
return

self._updateStackLevels()
if has_values_changed:
try:
try:
self._updateStackLevels()
if has_values_changed:
self.propertiesChanged.emit()
except RuntimeError:
# QtObject has been destroyed, no need to handle the signals anymore.
# This can happen when the QtObject in C++ has been destroyed, but the python object hasn't quite
# caught on yet. Once we call any signals, it will cause a runtimeError since all the underlying
# logic to emit pyqtSignals is gone.
return
except RuntimeError:
# QtObject has been destroyed, no need to handle the signals anymore.
# This can happen when the QtObject in C++ has been destroyed, but the python object hasn't quite
# caught on yet. Once we call any signals, it will cause a runtimeError since all the underlying
# logic to emit pyqtSignals is gone.
return

def _update(self, container = None):
if not self._stack or not self._watched_properties or not self._key:
Expand Down

0 comments on commit 1c95bb3

Please sign in to comment.