mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 22:54:08 -06:00
FIX: hybrid tree support crash in some case
jira: STUDIO-8313 Change-Id: Ide03d8f666232f457305f3dd298bf8151ba9c57b (cherry picked from commit 35bf682f7938ea6ddfa9525249c6a4cbb1f16071)
This commit is contained in:
parent
e6880a468b
commit
36970dd9a2
1 changed files with 4 additions and 1 deletions
|
@ -3474,7 +3474,10 @@ const ExPolygons& TreeSupportData::calculate_avoidance(const RadiusLayerPair& ke
|
|||
const auto &radius = key.radius;
|
||||
const auto &layer_nr = key.layer_nr;
|
||||
if (layer_nr == 0) {
|
||||
m_avoidance_cache[key] = get_collision(radius, 0);
|
||||
// avoid ExPolygons:~ExPolygons() in multi-threading case, as it's not thread-safe and may
|
||||
// cause crash in some cases. See STUDIO-8313.
|
||||
if (m_avoidance_cache.find(key) == m_avoidance_cache.end())
|
||||
m_avoidance_cache[key] = get_collision(radius, 0);
|
||||
return m_avoidance_cache[key];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue