mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 05:39:37 +08:00
SliceInfo: Defining container_serialized as empty, before trying to serialize
While discussing with Jordy about the code I just found a problematic case where sending slice info could fail. (This shouldn't happen, but..) If the first container is not serializable, then the for-loop will crash because container_serialized is not set for the if clause. Additionally the if-clause is at the moment useless, because it is always true, because the content of container_serialized gets never resetted. Contributes to CURA-1445
This commit is contained in:
parent
fef1cfb5e8
commit
1fd169c669
@ -119,6 +119,7 @@ class SliceInfo(Extension):
|
|||||||
}
|
}
|
||||||
for container in global_container_stack.getContainers():
|
for container in global_container_stack.getContainers():
|
||||||
container_id = container.getId()
|
container_id = container.getId()
|
||||||
|
container_serialized = ""
|
||||||
try:
|
try:
|
||||||
container_serialized = container.serialize()
|
container_serialized = container.serialize()
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user