Fixed integer division by zero error when loading files
This commit is contained in:
parent
58fb02f449
commit
97d308268d
19 changed files with 97 additions and 30 deletions
|
|
@ -110,7 +110,12 @@ void LineDrawTool::commit() {
|
|||
NetworkingObjects::NetObjOwnerPtr<CanvasComponentContainer>& containerPtr = objInfoBeingEdited->obj;
|
||||
containerPtr->commit_update(drawP);
|
||||
containerPtr->send_comp_update(drawP, true);
|
||||
drawP.layerMan.add_undo_place_component(objInfoBeingEdited);
|
||||
if(containerPtr->get_world_bounds().has_value())
|
||||
drawP.layerMan.add_undo_place_component(objInfoBeingEdited);
|
||||
else {
|
||||
auto& components = containerPtr->parentLayer->get_layer().components;
|
||||
components->erase(components, containerPtr->objInfo);
|
||||
}
|
||||
objInfoBeingEdited = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue