Skip to content

Commit

Permalink
fix(VirtualObject): fix nullptr-dereference in `ZkVirtualObject_setVi…
Browse files Browse the repository at this point in the history
…sual`
  • Loading branch information
lmichaelis committed Dec 6, 2023
1 parent 31fc965 commit 5d1b2d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vobs/VirtualObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ ZkVisual* ZkVirtualObject_setVisual(ZkVirtualObject* slf, ZkVisualType visual) {
obj = std::make_shared<zenkit::VisualMorphMesh>();
break;
case ZkVisualType_UNKNOWN:
obj = nullptr;
break;
slf->visual = nullptr;
return nullptr;
}

obj->type = static_cast<zenkit::VisualType>(visual);
Expand Down

0 comments on commit 5d1b2d3

Please sign in to comment.