Check if object pointer is null before commit
This commit is contained in:
parent
5daf1ce6c0
commit
c57ea608c3
5 changed files with 25 additions and 17 deletions
|
|
@ -153,10 +153,12 @@ void BrushTool::tool_update() {
|
|||
}
|
||||
|
||||
void BrushTool::commit_stroke() {
|
||||
NetworkingObjects::NetObjOwnerPtr<CanvasComponentContainer>& containerPtr = objInfoBeingEdited->obj;
|
||||
containerPtr->commit_update(drawP);
|
||||
containerPtr->send_comp_update(drawP, true);
|
||||
objInfoBeingEdited = nullptr;
|
||||
if(objInfoBeingEdited) {
|
||||
NetworkingObjects::NetObjOwnerPtr<CanvasComponentContainer>& containerPtr = objInfoBeingEdited->obj;
|
||||
containerPtr->commit_update(drawP);
|
||||
containerPtr->send_comp_update(drawP, true);
|
||||
objInfoBeingEdited = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void BrushTool::gui_toolbox() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue